Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit a6e8aa1

Browse files
Update OpenAPI to version generated from ref 1e8c1c9 (#807)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 1e8c1c9 commit a6e8aa1

File tree

1 file changed

+42
-16
lines changed

1 file changed

+42
-16
lines changed

api/openapi.json

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@
10091009
"content": {
10101010
"application/json": {
10111011
"schema": {
1012-
"$ref": "#/components/schemas/TokenUsage"
1012+
"$ref": "#/components/schemas/TokenUsageAggregate"
10131013
}
10141014
}
10151015
}
@@ -1233,10 +1233,10 @@
12331233
"format": "date-time",
12341234
"title": "Conversation Timestamp"
12351235
},
1236-
"token_usage": {
1236+
"token_usage_agg": {
12371237
"anyOf": [
12381238
{
1239-
"$ref": "#/components/schemas/TokenUsage"
1239+
"$ref": "#/components/schemas/TokenUsageAggregate"
12401240
},
12411241
{
12421242
"type": "null"
@@ -1251,7 +1251,7 @@
12511251
"type",
12521252
"chat_id",
12531253
"conversation_timestamp",
1254-
"token_usage"
1254+
"token_usage_agg"
12551255
],
12561256
"title": "Conversation",
12571257
"description": "Represents a conversation."
@@ -1467,7 +1467,8 @@
14671467
"anthropic",
14681468
"vllm",
14691469
"ollama",
1470-
"lm_studio"
1470+
"lm_studio",
1471+
"llamacpp"
14711472
],
14721473
"title": "ProviderType",
14731474
"description": "Represents the different types of providers we support."
@@ -1505,25 +1506,51 @@
15051506
"title": "QuestionType"
15061507
},
15071508
"TokenUsage": {
1509+
"properties": {
1510+
"input_tokens": {
1511+
"type": "integer",
1512+
"title": "Input Tokens",
1513+
"default": 0
1514+
},
1515+
"output_tokens": {
1516+
"type": "integer",
1517+
"title": "Output Tokens",
1518+
"default": 0
1519+
},
1520+
"input_cost": {
1521+
"type": "number",
1522+
"title": "Input Cost",
1523+
"default": 0
1524+
},
1525+
"output_cost": {
1526+
"type": "number",
1527+
"title": "Output Cost",
1528+
"default": 0
1529+
}
1530+
},
1531+
"type": "object",
1532+
"title": "TokenUsage",
1533+
"description": "TokenUsage it's not a table, it's a model to represent the token usage.\nThe data is stored in the outputs table."
1534+
},
1535+
"TokenUsageAggregate": {
15081536
"properties": {
15091537
"tokens_by_model": {
1510-
"items": {
1538+
"additionalProperties": {
15111539
"$ref": "#/components/schemas/TokenUsageByModel"
15121540
},
1513-
"type": "array",
1541+
"type": "object",
15141542
"title": "Tokens By Model"
15151543
},
1516-
"used_tokens": {
1517-
"type": "integer",
1518-
"title": "Used Tokens"
1544+
"token_usage": {
1545+
"$ref": "#/components/schemas/TokenUsage"
15191546
}
15201547
},
15211548
"type": "object",
15221549
"required": [
15231550
"tokens_by_model",
1524-
"used_tokens"
1551+
"token_usage"
15251552
],
1526-
"title": "TokenUsage",
1553+
"title": "TokenUsageAggregate",
15271554
"description": "Represents the tokens used. Includes the information of the tokens used by model.\n`used_tokens` are the total tokens used in the `tokens_by_model` list."
15281555
},
15291556
"TokenUsageByModel": {
@@ -1535,16 +1562,15 @@
15351562
"type": "string",
15361563
"title": "Model"
15371564
},
1538-
"used_tokens": {
1539-
"type": "integer",
1540-
"title": "Used Tokens"
1565+
"token_usage": {
1566+
"$ref": "#/components/schemas/TokenUsage"
15411567
}
15421568
},
15431569
"type": "object",
15441570
"required": [
15451571
"provider_type",
15461572
"model",
1547-
"used_tokens"
1573+
"token_usage"
15481574
],
15491575
"title": "TokenUsageByModel",
15501576
"description": "Represents the tokens used by a model."

0 commit comments

Comments
 (0)