SDK reference · Node SDK

prov.trace.prompts.label

prov.trace.prompts.label in Node SDK. Name a prompt, or clear its name with null.

Signature

prov.trace.prompts.label(promptKey: string, label: string | null): Promise<TracePrompt>

Parameters

promptKeystringRequired
labelstring | nullRequired

Request fields

labelstring | nullRequired
The prompt's name.

Returns

Promise<TracePrompt> The prompt, with its label.

HTTP operation

PATCH /v1/trace/prompts/{prompt_key}: Label a prompt

Errors

Example

const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/prompts/fe44d63ccb31048dc6a9c0281c33531011c9b18768bf7a578e4244ff257b96d5`, {
  method: "PATCH",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "label": "Injected vendor email" }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.