Skip to content

Commit 93f1079

Browse files
authored
Merge pull request #378 from tisnik/lcore-390-field-descriptions-sql-storage
LCORE-390: description for SQL storage config
2 parents d1d48b4 + b077505 commit 93f1079

File tree

3 files changed

+601
-18
lines changed

3 files changed

+601
-18
lines changed

docs/openapi.json

Lines changed: 275 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"info"
3939
],
4040
"summary": "Info Endpoint Handler",
41-
"description": "Handle request to the /info endpoint.",
41+
"description": "Handle request to the /info endpoint.\n\nProcess GET requests to the /info endpoint, returning the\nservice name and version.\n\nReturns:\n InfoResponse: An object containing the service's name and version.",
4242
"operationId": "info_endpoint_handler_v1_info_get",
4343
"responses": {
4444
"200": {
@@ -220,7 +220,7 @@
220220
"config"
221221
],
222222
"summary": "Config Endpoint Handler",
223-
"description": "Handle requests to the /config endpoint.",
223+
"description": "Handle requests to the /config endpoint.\n\nProcess GET requests to the /config endpoint and returns the\ncurrent service configuration.\n\nReturns:\n Configuration: The loaded service configuration object.",
224224
"operationId": "config_endpoint_handler_v1_config_get",
225225
"responses": {
226226
"200": {
@@ -367,6 +367,53 @@
367367
}
368368
}
369369
},
370+
"/v1/conversations": {
371+
"get": {
372+
"tags": [
373+
"conversations"
374+
],
375+
"summary": "Get Conversations List Endpoint Handler",
376+
"description": "Handle request to retrieve all conversations for the authenticated user.",
377+
"operationId": "get_conversations_list_endpoint_handler_v1_conversations_get",
378+
"responses": {
379+
"200": {
380+
"description": "Successful Response",
381+
"content": {
382+
"application/json": {
383+
"schema": {
384+
"$ref": "#/components/schemas/ConversationsListResponse"
385+
}
386+
}
387+
},
388+
"conversations": [
389+
{
390+
"conversation_id": "123e4567-e89b-12d3-a456-426614174000",
391+
"created_at": "2024-01-01T00:00:00Z",
392+
"last_message_at": "2024-01-01T00:05:00Z",
393+
"last_used_model": "gemini/gemini-1.5-flash",
394+
"last_used_provider": "gemini",
395+
"message_count": 5
396+
},
397+
{
398+
"conversation_id": "456e7890-e12b-34d5-a678-901234567890",
399+
"created_at": "2024-01-01T01:00:00Z",
400+
"last_message_at": "2024-01-01T01:02:00Z",
401+
"last_used_model": "gemini/gemini-2.0-flash",
402+
"last_used_provider": "gemini",
403+
"message_count": 2
404+
}
405+
]
406+
},
407+
"503": {
408+
"description": "Service Unavailable",
409+
"detail": {
410+
"response": "Unable to connect to Llama Stack",
411+
"cause": "Connection error."
412+
}
413+
}
414+
}
415+
}
416+
},
370417
"/v1/conversations/{conversation_id}": {
371418
"get": {
372419
"tags": [
@@ -505,7 +552,7 @@
505552
"health"
506553
],
507554
"summary": "Readiness Probe Get Method",
508-
"description": "Ready status of service with provider health details.",
555+
"description": "Handle the readiness probe endpoint, returning service readiness.\n\nIf any provider reports an error status, responds with HTTP 503\nand details of unhealthy providers; otherwise, indicates the\nservice is ready.",
509556
"operationId": "readiness_probe_get_method_readiness_get",
510557
"responses": {
511558
"200": {
@@ -537,7 +584,7 @@
537584
"health"
538585
],
539586
"summary": "Liveness Probe Get Method",
540-
"description": "Live status of service.",
587+
"description": "Return the liveness status of the service.\n\nReturns:\n LivenessResponse: Indicates that the service is alive.",
541588
"operationId": "liveness_probe_get_method_liveness_get",
542589
"responses": {
543590
"200": {
@@ -569,7 +616,7 @@
569616
"authorized"
570617
],
571618
"summary": "Authorized Endpoint Handler",
572-
"description": "Handle request to the /authorized endpoint.",
619+
"description": "Handle request to the /authorized endpoint.\n\nProcess POST requests to the /authorized endpoint, returning\nthe authenticated user's ID and username.\n\nReturns:\n AuthorizedResponse: Contains the user ID and username of the authenticated user.",
573620
"operationId": "authorized_endpoint_handler_authorized_post",
574621
"responses": {
575622
"200": {
@@ -611,7 +658,7 @@
611658
"metrics"
612659
],
613660
"summary": "Metrics Endpoint Handler",
614-
"description": "Handle request to the /metrics endpoint.",
661+
"description": "Handle request to the /metrics endpoint.\n\nProcess GET requests to the /metrics endpoint, returning the\nlatest Prometheus metrics in form of a plain text.\n\nInitializes model metrics on the first request if not already\nset up, then responds with the current metrics snapshot in\nPrometheus format.",
615662
"operationId": "metrics_endpoint_handler_metrics_get",
616663
"responses": {
617664
"200": {
@@ -775,6 +822,14 @@
775822
"user_data_collection": {
776823
"$ref": "#/components/schemas/UserDataCollection"
777824
},
825+
"database": {
826+
"$ref": "#/components/schemas/DatabaseConfiguration",
827+
"default": {
828+
"sqlite": {
829+
"db_path": "/tmp/lightspeed-stack.db"
830+
}
831+
}
832+
},
778833
"mcp_servers": {
779834
"items": {
780835
"$ref": "#/components/schemas/ModelContextProtocolServer"
@@ -853,6 +908,75 @@
853908
}
854909
]
855910
},
911+
"ConversationDetails": {
912+
"properties": {
913+
"conversation_id": {
914+
"type": "string",
915+
"title": "Conversation Id"
916+
},
917+
"created_at": {
918+
"anyOf": [
919+
{
920+
"type": "string"
921+
},
922+
{
923+
"type": "null"
924+
}
925+
],
926+
"title": "Created At"
927+
},
928+
"last_message_at": {
929+
"anyOf": [
930+
{
931+
"type": "string"
932+
},
933+
{
934+
"type": "null"
935+
}
936+
],
937+
"title": "Last Message At"
938+
},
939+
"message_count": {
940+
"anyOf": [
941+
{
942+
"type": "integer"
943+
},
944+
{
945+
"type": "null"
946+
}
947+
],
948+
"title": "Message Count"
949+
},
950+
"last_used_model": {
951+
"anyOf": [
952+
{
953+
"type": "string"
954+
},
955+
{
956+
"type": "null"
957+
}
958+
],
959+
"title": "Last Used Model"
960+
},
961+
"last_used_provider": {
962+
"anyOf": [
963+
{
964+
"type": "string"
965+
},
966+
{
967+
"type": "null"
968+
}
969+
],
970+
"title": "Last Used Provider"
971+
}
972+
},
973+
"type": "object",
974+
"required": [
975+
"conversation_id"
976+
],
977+
"title": "ConversationDetails",
978+
"description": "Model representing the details of a user conversation.\n\nAttributes:\n conversation_id: The conversation ID (UUID).\n created_at: When the conversation was created.\n last_message_at: When the last message was sent.\n message_count: Number of user messages in the conversation.\n model: The model used for the conversation.\n\nExample:\n ```python\n conversation = ConversationSummary(\n conversation_id=\"123e4567-e89b-12d3-a456-426614174000\"\n created_at=\"2024-01-01T00:00:00Z\",\n last_message_at=\"2024-01-01T00:05:00Z\",\n message_count=5,\n model=\"gemini/gemini-2.0-flash\"\n )\n ```"
979+
},
856980
"ConversationResponse": {
857981
"properties": {
858982
"conversation_id": {
@@ -897,6 +1021,42 @@
8971021
}
8981022
]
8991023
},
1024+
"ConversationsListResponse": {
1025+
"properties": {
1026+
"conversations": {
1027+
"items": {
1028+
"$ref": "#/components/schemas/ConversationDetails"
1029+
},
1030+
"type": "array",
1031+
"title": "Conversations"
1032+
}
1033+
},
1034+
"type": "object",
1035+
"required": [
1036+
"conversations"
1037+
],
1038+
"title": "ConversationsListResponse",
1039+
"description": "Model representing a response for listing conversations of a user.\n\nAttributes:\n conversations: List of conversation details associated with the user.\n\nExample:\n ```python\n conversations_list = ConversationsListResponse(\n conversations=[\n ConversationDetails(\n conversation_id=\"123e4567-e89b-12d3-a456-426614174000\",\n created_at=\"2024-01-01T00:00:00Z\",\n last_message_at=\"2024-01-01T00:05:00Z\",\n message_count=5,\n model=\"gemini/gemini-2.0-flash\"\n ),\n ConversationDetails(\n conversation_id=\"456e7890-e12b-34d5-a678-901234567890\"\n created_at=\"2024-01-01T01:00:00Z\",\n message_count=2,\n model=\"gemini/gemini-2.5-flash\"\n )\n ]\n )\n ```",
1040+
"examples": [
1041+
{
1042+
"conversations": [
1043+
{
1044+
"conversation_id": "123e4567-e89b-12d3-a456-426614174000",
1045+
"created_at": "2024-01-01T00:00:00Z",
1046+
"last_message_at": "2024-01-01T00:05:00Z",
1047+
"message_count": 5,
1048+
"model": "gemini/gemini-2.0-flash"
1049+
},
1050+
{
1051+
"conversation_id": "456e7890-e12b-34d5-a678-901234567890",
1052+
"created_at": "2024-01-01T01:00:00Z",
1053+
"message_count": 2,
1054+
"model": "gemini/gemini-2.5-flash"
1055+
}
1056+
]
1057+
}
1058+
]
1059+
},
9001060
"Customization": {
9011061
"properties": {
9021062
"disable_query_system_prompt": {
@@ -994,6 +1154,33 @@
9941154
"title": "DataCollectorConfiguration",
9951155
"description": "Data collector configuration for sending data to ingress server."
9961156
},
1157+
"DatabaseConfiguration": {
1158+
"properties": {
1159+
"sqlite": {
1160+
"anyOf": [
1161+
{
1162+
"$ref": "#/components/schemas/SQLiteDatabaseConfiguration"
1163+
},
1164+
{
1165+
"type": "null"
1166+
}
1167+
]
1168+
},
1169+
"postgres": {
1170+
"anyOf": [
1171+
{
1172+
"$ref": "#/components/schemas/PostgreSQLDatabaseConfiguration"
1173+
},
1174+
{
1175+
"type": "null"
1176+
}
1177+
]
1178+
}
1179+
},
1180+
"type": "object",
1181+
"title": "DatabaseConfiguration",
1182+
"description": "Database configuration."
1183+
},
9971184
"FeedbackCategory": {
9981185
"type": "string",
9991186
"enum": [
@@ -1382,6 +1569,74 @@
13821569
"title": "ModelsResponse",
13831570
"description": "Model representing a response to models request."
13841571
},
1572+
"PostgreSQLDatabaseConfiguration": {
1573+
"properties": {
1574+
"host": {
1575+
"type": "string",
1576+
"title": "Host",
1577+
"default": "localhost"
1578+
},
1579+
"port": {
1580+
"type": "integer",
1581+
"title": "Port",
1582+
"default": 5432
1583+
},
1584+
"db": {
1585+
"type": "string",
1586+
"title": "Db"
1587+
},
1588+
"user": {
1589+
"type": "string",
1590+
"title": "User"
1591+
},
1592+
"password": {
1593+
"type": "string",
1594+
"title": "Password"
1595+
},
1596+
"namespace": {
1597+
"anyOf": [
1598+
{
1599+
"type": "string"
1600+
},
1601+
{
1602+
"type": "null"
1603+
}
1604+
],
1605+
"title": "Namespace",
1606+
"default": "lightspeed-stack"
1607+
},
1608+
"ssl_mode": {
1609+
"type": "string",
1610+
"title": "Ssl Mode",
1611+
"default": "prefer"
1612+
},
1613+
"gss_encmode": {
1614+
"type": "string",
1615+
"title": "Gss Encmode",
1616+
"default": "prefer"
1617+
},
1618+
"ca_cert_path": {
1619+
"anyOf": [
1620+
{
1621+
"type": "string",
1622+
"format": "file-path"
1623+
},
1624+
{
1625+
"type": "null"
1626+
}
1627+
],
1628+
"title": "Ca Cert Path"
1629+
}
1630+
},
1631+
"type": "object",
1632+
"required": [
1633+
"db",
1634+
"user",
1635+
"password"
1636+
],
1637+
"title": "PostgreSQLDatabaseConfiguration",
1638+
"description": "PostgreSQL database configuration."
1639+
},
13851640
"ProviderHealthStatus": {
13861641
"properties": {
13871642
"provider_id": {
@@ -1649,6 +1904,20 @@
16491904
}
16501905
]
16511906
},
1907+
"SQLiteDatabaseConfiguration": {
1908+
"properties": {
1909+
"db_path": {
1910+
"type": "string",
1911+
"title": "Db Path"
1912+
}
1913+
},
1914+
"type": "object",
1915+
"required": [
1916+
"db_path"
1917+
],
1918+
"title": "SQLiteDatabaseConfiguration",
1919+
"description": "SQLite database configuration."
1920+
},
16521921
"ServiceConfiguration": {
16531922
"properties": {
16541923
"host": {

0 commit comments

Comments
 (0)