{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/ChatMessage", "title": "ChatMessage", "type": "object", "required": [ "role", "content" ], "properties": { "role": { "type": "string", "enum": [ "system", "user", "assistant", "tool" ], "description": "The role of the message author" }, "content": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "object" } } ], "description": "The contents of the message" }, "name": { "type": "string", "description": "An optional name for the participant" }, "tool_calls": { "type": "array", "items": { "$ref": "#/components/schemas/ToolCall" }, "description": "Tool calls generated by the model" }, "tool_call_id": { "type": "string", "description": "Tool call that this message is responding to" } } }