205 lines
6.9 KiB
JSON
205 lines
6.9 KiB
JSON
{
|
|
"$defs": {
|
|
"FinishReason": {
|
|
"description": "Represents the reason for finishing the generation.",
|
|
"enum": [
|
|
"stop",
|
|
"length",
|
|
"content_filter",
|
|
"tool_call",
|
|
"error"
|
|
],
|
|
"title": "FinishReason",
|
|
"type": "string"
|
|
},
|
|
"GenericPart": {
|
|
"additionalProperties": true,
|
|
"description": "Represents an arbitrary message part with any type and properties.\nThis allows for extensibility with custom message part types.",
|
|
"properties": {
|
|
"type": {
|
|
"description": "The type of the content captured in this part.",
|
|
"title": "Type",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type"
|
|
],
|
|
"title": "GenericPart",
|
|
"type": "object"
|
|
},
|
|
"OutputMessage": {
|
|
"additionalProperties": true,
|
|
"description": "Represents an output message generated by the model or agent. The output message captures\nspecific response (choice, candidate).",
|
|
"properties": {
|
|
"role": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/Role"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"description": "Role of the entity that created the message.",
|
|
"title": "Role"
|
|
},
|
|
"parts": {
|
|
"description": "List of message parts that make up the message content.",
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/TextPart"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/ToolCallRequestPart"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/ToolCallResponsePart"
|
|
},
|
|
{
|
|
"$ref": "#/$defs/GenericPart"
|
|
}
|
|
]
|
|
},
|
|
"title": "Parts",
|
|
"type": "array"
|
|
},
|
|
"finish_reason": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/$defs/FinishReason"
|
|
},
|
|
{
|
|
"type": "string"
|
|
}
|
|
],
|
|
"description": "Reason for finishing the generation.",
|
|
"title": "Finish Reason"
|
|
}
|
|
},
|
|
"required": [
|
|
"role",
|
|
"parts",
|
|
"finish_reason"
|
|
],
|
|
"title": "OutputMessage",
|
|
"type": "object"
|
|
},
|
|
"Role": {
|
|
"enum": [
|
|
"system",
|
|
"user",
|
|
"assistant",
|
|
"tool"
|
|
],
|
|
"title": "Role",
|
|
"type": "string"
|
|
},
|
|
"TextPart": {
|
|
"additionalProperties": true,
|
|
"description": "Represents text content sent to or received from the model.",
|
|
"properties": {
|
|
"type": {
|
|
"const": "text",
|
|
"description": "The type of the content captured in this part.",
|
|
"title": "Type",
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"description": "Text content sent to or received from the model.",
|
|
"title": "Content",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"content"
|
|
],
|
|
"title": "TextPart",
|
|
"type": "object"
|
|
},
|
|
"ToolCallRequestPart": {
|
|
"additionalProperties": true,
|
|
"description": "Represents a tool call requested by the model.",
|
|
"properties": {
|
|
"type": {
|
|
"const": "tool_call",
|
|
"description": "The type of the content captured in this part.",
|
|
"title": "Type",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"description": "Unique identifier for the tool call.",
|
|
"title": "Id"
|
|
},
|
|
"name": {
|
|
"description": "Name of the tool.",
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"arguments": {
|
|
"default": null,
|
|
"description": "Arguments for the tool call.",
|
|
"title": "Arguments"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"name"
|
|
],
|
|
"title": "ToolCallRequestPart",
|
|
"type": "object"
|
|
},
|
|
"ToolCallResponsePart": {
|
|
"additionalProperties": true,
|
|
"description": "Represents a tool call result sent to the model or a built-in tool call outcome and details.",
|
|
"properties": {
|
|
"type": {
|
|
"const": "tool_call_response",
|
|
"description": "The type of the content captured in this part.",
|
|
"title": "Type",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"description": "Unique tool call identifier.",
|
|
"title": "Id"
|
|
},
|
|
"response": {
|
|
"description": "Tool call response.",
|
|
"title": "Response"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"response"
|
|
],
|
|
"title": "ToolCallResponsePart",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"description": "Represents the list of output messages generated by the model or agent.",
|
|
"items": {
|
|
"$ref": "#/$defs/OutputMessage"
|
|
},
|
|
"title": "OutputMessages",
|
|
"type": "array"
|
|
} |