Describes the response format of a chat request.

ChatModel

interface ChatModel {
    citations?: CitationModel[];
    contentFilterResults?: ContentFilterResults;
    contextSnippetCount?: number;
    finishReason?: string;
    id?: string;
    message?: ChatMessageModel;
    model?: string;
    usage?: UsageModel;
}

Properties

citations?: CitationModel[]

Citations supporting the information in the response.

ChatModel

contentFilterResults?: ContentFilterResults

ChatModel

contextSnippetCount?: number

The number of context snippets provided to the model to generate the response. This indicates how much retrieved information was available for the generation, allowing for logic to be applied if no context was found (count is 0).

ChatModel

finishReason?: string

Indicates why the chat response generation stopped. This signals the end of the response.

  • stop: The model finished generating the response.

  • length: Generation was cut off because the maximum number of tokens allowed was reached.

  • content_filter: Generation stopped because content was blocked by content filtering rules. (for example, content that contains hate speech or violent material).

  • tool_calls: Generation stopped because a tool call was triggered.

ChatModel

id?: string

A unique identifier for this chat response.

ChatModel

ChatModel

model?: string

The name or identifier of the model used to generate this chat response.

ChatModel

usage?: UsageModel

ChatModel