OpenAIRequestMessage
A message in the chat completion request. Represents a conversation turn from the user, assistant, system, or tool.
Example Usage
typescript
import { OpenAIRequestMessage } from "@meetkai/mka1/models/components";
let value: OpenAIRequestMessage = {
role: "system",
content: "<value>",
};Fields
| Field | Type | Required | Description |
|---|---|---|---|
role | components.Role | ✔️ | The role of the message author. Determines how the message is interpreted by the model. |
name | string | ➖ | An optional name for the participant. For tool role messages, this is the name of the function called. |
toolCallId | string | ➖ | Tool call that this message is responding to. Required when role is 'tool'. |
content | components.Content | ✔️ | The contents of the message. Can be a string, an array of content parts (for multimodal inputs), or null for assistant messages with tool calls. |
toolCalls | components.ToolCalls[] | ➖ | The tool calls generated by the model, such as function calls. Only present for assistant messages with tool calls. |