View as Markdown

SDK reference · Node SDK

prov.account.setTraceExplanations

prov.account.setTraceExplanations in Node SDK. Turn the AI summary or AI labelling on or off (an owner/admin session, or an admin-scope key).

Signature

prov.account.setTraceExplanations(setting: { aiSummary?: "off" | "on"; aiLabeling?: "off" | "on"; }): Promise<{ object: "trace_explanations_setting"; aiSummary: "off" | "on"; aiLabeling: "off" | "on"; explainerConfigured: boolean }>

Parameters

setting{ aiSummary?: "off" | "on"; aiLabeling?: "off" | "on"; }Required

Request fields

ai_summaryenum
Whether AI trip summaries are on or off. One of off, on.
ai_labelingenum
Whether the canary family builder may send example text to the AI provider for proposed labels and plain words. Send either field or both. One of off, on.

Returns

Promise<{ object: "trace_explanations_setting"; aiSummary: "off" | "on"; aiLabeling: "off" | "on"; explainerConfigured: boolean }> The setting.

HTTP operation

PUT /v1/trace/settings/explanations: Set the AI settings

Errors

Example

const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/settings/explanations`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "ai_summary": "off" }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.