orkes.shared.OrkesMessageSchema#
- pydantic model orkes.shared.OrkesMessageSchema[source]#
Represents a single message in a conversation with an LLM.
This schema is used to represent a single message in a conversation with an LLM. A conversation is typically a sequence of messages, where each message has a role, content, and optionally a content type and tool call ID.
- role#
The role of the message’s author, such as ‘user’, ‘system’, ‘assistant’, or ‘tool’.
- Type:
str
- content#
The content of the message. Can be a string, a list of dictionaries (for tool calls), or None.
- Type:
Union[str, List[Dict], None]
- content_type#
The type of content, e.g., ‘tool_calls’.
- Type:
Optional[str]
- tool_call_id#
The ID of the tool call, used for messages with the ‘tool’ role.
- Type:
Optional[str]
- Fields:
content (str | List[Dict] | None)content_type (str | None)role (str)tool_call_id (str | None)
- field content: str | List[Dict] | None [Required]#
- field content_type: str | None = None#
- field role: str [Required]#
- field tool_call_id: str | None = None#