Skip to content

Commit 0d571db

Browse files
committed
Added tool calls and timestamps into turn history
1 parent 1c04683 commit 0d571db

18 files changed

Lines changed: 2276 additions & 1080 deletions

docs/openapi.json

Lines changed: 127 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2445,26 +2445,6 @@
24452445
}
24462446
}
24472447
}
2448-
},
2449-
"503": {
2450-
"description": "Service unavailable",
2451-
"content": {
2452-
"application/json": {
2453-
"schema": {
2454-
"$ref": "#/components/schemas/ServiceUnavailableResponse"
2455-
},
2456-
"examples": {
2457-
"llama stack": {
2458-
"value": {
2459-
"detail": {
2460-
"cause": "Connection error while trying to reach backend service.",
2461-
"response": "Unable to connect to Llama Stack"
2462-
}
2463-
}
2464-
}
2465-
}
2466-
}
2467-
}
24682448
}
24692449
}
24702450
}
@@ -2510,7 +2490,11 @@
25102490
"type": "assistant"
25112491
}
25122492
],
2513-
"started_at": "2024-01-01T00:01:00Z"
2493+
"model": "gpt-4o-mini",
2494+
"provider": "openai",
2495+
"started_at": "2024-01-01T00:01:00Z",
2496+
"tool_calls": [],
2497+
"tool_results": []
25142498
}
25152499
],
25162500
"conversation_id": "123e4567-e89b-12d3-a456-426614174000"
@@ -3196,7 +3180,11 @@
31963180
"type": "assistant"
31973181
}
31983182
],
3199-
"started_at": "2024-01-01T00:01:00Z"
3183+
"model": "gpt-4o-mini",
3184+
"provider": "openai",
3185+
"started_at": "2024-01-01T00:01:00Z",
3186+
"tool_calls": [],
3187+
"tool_results": []
32003188
}
32013189
],
32023190
"conversation_id": "123e4567-e89b-12d3-a456-426614174000"
@@ -5924,8 +5912,7 @@
59245912
},
59255913
"chat_history": {
59265914
"items": {
5927-
"additionalProperties": true,
5928-
"type": "object"
5915+
"$ref": "#/components/schemas/ConversationTurn"
59295916
},
59305917
"type": "array",
59315918
"title": "Chat History",
@@ -5943,7 +5930,11 @@
59435930
"type": "assistant"
59445931
}
59455932
],
5946-
"started_at": "2024-01-01T00:01:00Z"
5933+
"model": "gpt-4o-mini",
5934+
"provider": "openai",
5935+
"started_at": "2024-01-01T00:01:00Z",
5936+
"tool_calls": [],
5937+
"tool_results": []
59475938
}
59485939
]
59495940
}
@@ -5954,7 +5945,7 @@
59545945
"chat_history"
59555946
],
59565947
"title": "ConversationResponse",
5957-
"description": "Model representing a response for retrieving a conversation.\n\nAttributes:\n conversation_id: The conversation ID (UUID).\n chat_history: The simplified chat history as a list of conversation turns.\n\nExample:\n ```python\n conversation_response = ConversationResponse(\n conversation_id=\"123e4567-e89b-12d3-a456-426614174000\",\n chat_history=[\n {\n \"messages\": [\n {\"content\": \"Hello\", \"type\": \"user\"},\n {\"content\": \"Hi there!\", \"type\": \"assistant\"}\n ],\n \"started_at\": \"2024-01-01T00:01:00Z\",\n \"completed_at\": \"2024-01-01T00:01:05Z\"\n }\n ]\n )\n ```",
5948+
"description": "Model representing a response for retrieving a conversation.\n\nAttributes:\n conversation_id: The conversation ID (UUID).\n chat_history: The chat history as a list of conversation turns.",
59585949
"examples": [
59595950
{
59605951
"chat_history": [
@@ -5970,13 +5961,86 @@
59705961
"type": "assistant"
59715962
}
59725963
],
5973-
"started_at": "2024-01-01T00:01:00Z"
5964+
"model": "gpt-4o-mini",
5965+
"provider": "openai",
5966+
"started_at": "2024-01-01T00:01:00Z",
5967+
"tool_calls": [],
5968+
"tool_results": []
59745969
}
59755970
],
59765971
"conversation_id": "123e4567-e89b-12d3-a456-426614174000"
59775972
}
59785973
]
59795974
},
5975+
"ConversationTurn": {
5976+
"properties": {
5977+
"messages": {
5978+
"items": {
5979+
"$ref": "#/components/schemas/Message"
5980+
},
5981+
"type": "array",
5982+
"title": "Messages",
5983+
"description": "List of messages in this turn"
5984+
},
5985+
"tool_calls": {
5986+
"items": {
5987+
"$ref": "#/components/schemas/ToolCallSummary"
5988+
},
5989+
"type": "array",
5990+
"title": "Tool Calls",
5991+
"description": "List of tool calls made in this turn"
5992+
},
5993+
"tool_results": {
5994+
"items": {
5995+
"$ref": "#/components/schemas/ToolResultSummary"
5996+
},
5997+
"type": "array",
5998+
"title": "Tool Results",
5999+
"description": "List of tool results from this turn"
6000+
},
6001+
"provider": {
6002+
"type": "string",
6003+
"title": "Provider",
6004+
"description": "Provider identifier used for this turn",
6005+
"examples": [
6006+
"openai"
6007+
]
6008+
},
6009+
"model": {
6010+
"type": "string",
6011+
"title": "Model",
6012+
"description": "Model identifier used for this turn",
6013+
"examples": [
6014+
"gpt-4o-mini"
6015+
]
6016+
},
6017+
"started_at": {
6018+
"type": "string",
6019+
"title": "Started At",
6020+
"description": "ISO 8601 timestamp when the turn started",
6021+
"examples": [
6022+
"2024-01-01T00:01:00Z"
6023+
]
6024+
},
6025+
"completed_at": {
6026+
"type": "string",
6027+
"title": "Completed At",
6028+
"description": "ISO 8601 timestamp when the turn completed",
6029+
"examples": [
6030+
"2024-01-01T00:01:05Z"
6031+
]
6032+
}
6033+
},
6034+
"type": "object",
6035+
"required": [
6036+
"provider",
6037+
"model",
6038+
"started_at",
6039+
"completed_at"
6040+
],
6041+
"title": "ConversationTurn",
6042+
"description": "Model representing a single conversation turn.\n\nAttributes:\n messages: List of messages in this turn.\n tool_calls: List of tool calls made in this turn.\n tool_results: List of tool results from this turn.\n provider: Provider identifier used for this turn.\n model: Model identifier used for this turn.\n started_at: ISO 8601 timestamp when the turn started.\n completed_at: ISO 8601 timestamp when the turn completed."
6043+
},
59806044
"ConversationUpdateRequest": {
59816045
"properties": {
59826046
"topic_summary": {
@@ -7029,6 +7093,42 @@
70297093
"title": "MCPServerAuthInfo",
70307094
"description": "Information about MCP server client authentication options."
70317095
},
7096+
"Message": {
7097+
"properties": {
7098+
"content": {
7099+
"type": "string",
7100+
"title": "Content",
7101+
"description": "The message content",
7102+
"examples": [
7103+
"Hello, how can I help you?"
7104+
]
7105+
},
7106+
"type": {
7107+
"type": "string",
7108+
"enum": [
7109+
"user",
7110+
"assistant",
7111+
"system",
7112+
"developer"
7113+
],
7114+
"title": "Type",
7115+
"description": "The type of message",
7116+
"examples": [
7117+
"user",
7118+
"assistant",
7119+
"system",
7120+
"developer"
7121+
]
7122+
}
7123+
},
7124+
"type": "object",
7125+
"required": [
7126+
"content",
7127+
"type"
7128+
],
7129+
"title": "Message",
7130+
"description": "Model representing a message in a conversation turn.\n\nAttributes:\n content: The message content.\n type: The type of message (user or assistant)."
7131+
},
70327132
"ModelContextProtocolServer": {
70337133
"properties": {
70347134
"name": {

0 commit comments

Comments
 (0)