Skip to main content

Variable: PromptContextAuditSchema

const PromptContextAuditSchema: TObject<{ budget: TObject<{ contextLimit: TInteger; promptTokens: TInteger; reservedForReply: TInteger; }>; chatId: TString; chatTemplateId: TUnion<[TString, TNull]>; contextStrategy: TString; createdAt: TInteger; diagnostics: TArray<TString>; entries: TArray<TObject<{ content: TString; exclusionReason: TUnion<[TLiteral<"disabled">, TLiteral<"empty">, TLiteral<"manual">, TLiteral<"context-shift">, TLiteral<"final-budget">, TLiteral<"interceptor">, TLiteral<"model-mismatch">, TLiteral<"none">]>; identifier: TString; included: TBoolean; name: TOptional<TString>; order: TInteger; role: TUnion<[TLiteral<"system">, TLiteral<"user">, TLiteral<"assistant">, TLiteral<"tool">, TLiteral<"plugin">]>; source: TString; tokens: TInteger; }>>; errorCode: TUnion<[TString, TNull]>; generationId: TString; model: TString; promptTemplateId: TUnion<[TString, TNull]>; promptTemplateMode: TUnion<[TLiteral<"chat">, TLiteral<"text">]>; providerConfigId: TUnion<[TString, TNull]>; providerKind: TString; providerMessages: TArray<TObject<{ content: TString; name: TOptional<TUnion<[TString, TNull]>>; role: TUnion<[TLiteral<"system">, TLiteral<"user">, TLiteral<"assistant">, TLiteral<"tool">, TLiteral<"plugin">]>; }>>; providerSource: TUnion<[TString, TNull]>; status: TUnion<[TLiteral<"prepared">, TLiteral<"completed">, TLiteral<"failed">, TLiteral<"cancelled">]>; tokenizer: TObject<{ approximate: TBoolean; profile: TString; }>; usage: TUnion<[TObject<{ completionTokens: TInteger; promptTokens: TInteger; totalTokens: TInteger; }>, TNull]>; }>

Defined in: packages/contracts/src/promptAudit.ts:42