Skip to main content

Interface: ChatMessage

Defined in: packages/core/src/providers/types.ts:333

Normalized chat message format across all providers

Properties

content

content: string | MessageContentBlock[]

Defined in: packages/core/src/providers/types.ts:335


rawContent?

optional rawContent?: object[]

Defined in: packages/core/src/providers/types.ts:349

Raw content blocks in provider-specific format (e.g., Anthropic's tool_use blocks)

id?

optional id?: string

input?

optional input?: unknown

name?

optional name?: string

signature?

optional signature?: string

text?

optional text?: string

thinking?

optional thinking?: string

type

type: "text" | "tool_use" | "thinking"


role

role: MessageRole

Defined in: packages/core/src/providers/types.ts:334


tool_call_id?

optional tool_call_id?: string

Defined in: packages/core/src/providers/types.ts:337

For tool messages: the ID of the tool call this is responding to


tool_calls?

optional tool_calls?: object[]

Defined in: packages/core/src/providers/types.ts:339

For assistant messages with tool calls (OpenAI format)

function

function: object

function.arguments

arguments: string

function.name

name: string

id

id: string

result?

optional result?: unknown

type

type: "function"