Interface: ChatCompletionMessage
Defined in: src/lib/models/prompt.ts:52 Represents a message in a chat completion response from an AI model. Contains the assistant’s response including the content, role, and optional function/tool call information. Used in chat-based AI interactions where the model responds as an assistant in a conversation. ChatCompletionMessageExamples
Properties
content
content:Defined in: src/lib/models/prompt.ts:54 The text content of the response, or null if using function callsnull|string
function_call?
Defined in: src/lib/models/prompt.ts:55 Legacy function call information (deprecated in favor of tool_calls)optionalfunction_call:ToolCallFunction
role
role: "assistant"
Defined in: src/lib/models/prompt.ts:53
Always “assistant” for response messages
tool_calls?
Defined in: src/lib/models/prompt.ts:56 Array of tool/function calls made by the assistantoptionaltool_calls:ChatCompletionToolCall[]