LlmApiCallDebugEvent Interface
An DebugEvent for an API call directly to a LLM.
To use, import via @fluidframework/ai-collab/alpha
.
For more information about our API support guarantees, see here.
Signature
export interface LlmApiCallDebugEvent extends DebugEvent
Extends: DebugEvent
Properties
Property | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
eventFlowTraceId | Alpha |
string | The unique id that will be shared across all debug events that are part of the same event flow. | |
eventName | Alpha |
"LLM_API_CALL" | ||
modelName | Alpha |
string | The LLM model name that was used for the API call. | |
requestParams | Alpha |
unknown | The request parameters sent in the API call to the LLM. (Not the HTTP request parameters such as headers, etc.) | |
response | Alpha |
unknown | The raw response from the LLM. | |
tokenUsage | Alpha |
optional |
{ promptTokens: number; completionTokens: number; } | The total number of tokens used in the API call to the LLM. |
triggeringEventFlowName | Alpha |
EventFlowDebugName | The event flow name that made this LLM API call. |
Property Details
eventFlowTraceId
The unique id that will be shared across all debug events that are part of the same event flow.
For more information about our API support guarantees, see here.
Signature
eventFlowTraceId: string;
Type: string
Remarks
This can be used to correlate all debug events that are part of the same event flow.
eventName
For more information about our API support guarantees, see here.
Signature
eventName: "LLM_API_CALL";
Type: "LLM_API_CALL"
modelName
The LLM model name that was used for the API call.
For more information about our API support guarantees, see here.
Signature
modelName: string;
Type: string
requestParams
The request parameters sent in the API call to the LLM. (Not the HTTP request parameters such as headers, etc.)
For more information about our API support guarantees, see here.
Signature
requestParams: unknown;
Type: unknown
response
The raw response from the LLM.
For more information about our API support guarantees, see here.
Signature
response: unknown;
Type: unknown
tokenUsage
The total number of tokens used in the API call to the LLM.
For more information about our API support guarantees, see here.
Signature
tokenUsage?: {
promptTokens: number;
completionTokens: number;
};
Type: { promptTokens: number; completionTokens: number; }
triggeringEventFlowName
The event flow name that made this LLM API call.
For more information about our API support guarantees, see here.
Signature
triggeringEventFlowName: EventFlowDebugName;
Type: EventFlowDebugName