SDK reference · Node SDK
prov.trace.guard
prov.trace.guard in Node SDK. Wrap fn so it only ever sees a completion the account's Trace rules let through.
Signature
prov.trace.guard<R>(fn: (completion: TracedChatCompletion) => R | Promise<R>, opts?: TraceGuardOptions): (params: ChatCompletionParams) => Promise<R>Parameters
fn(completion: TracedChatCompletion) => R | Promise<R>RequiredoptsTraceGuardOptions
Returns
(params: ChatCompletionParams) => Promise<R>
HTTP operation
Runs locally, with no request to the API.