Skip to content

OpenAIMessage

Defined in: adapters/openai.ts:70

OpenAI chat message structure.

Represents a single message in a conversation with role-based content. Supports text, multimodal content, and tool-related messages.

  • OpenAIMessageContent
  • OpenAIRequest

content: OpenAIMessageContent

Defined in: adapters/openai.ts:75

Message content - can be text string or array of content blocks for multimodal


optional name: string

Defined in: adapters/openai.ts:78

Optional name for the message author (useful for multi-user or tool messages)


role: "system" | "user" | "assistant" | "tool"

Defined in: adapters/openai.ts:72

Message role: system (instructions), user (input), assistant (AI response), or tool (function results)


optional tool_call_id: string

Defined in: adapters/openai.ts:81

Tool call ID when role is ‘tool’ - links tool results to the original tool call