75 lines
1.7 KiB
JSON
75 lines
1.7 KiB
JSON
{
|
|
"openapi": "3.0.0",
|
|
"info": {
|
|
"title": "StockDocs",
|
|
"version": "1.0.0"
|
|
},
|
|
"paths": {
|
|
"/query": {
|
|
"post": {
|
|
"summary": "Query the vector database",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"question": { "type": "string" }
|
|
},
|
|
"required": ["question"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Query results",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"results": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"document": { "type": "string" },
|
|
"score": { "type": "number" },
|
|
"metadata": { "type": "object" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/health": {
|
|
"get": {
|
|
"summary": "Health check",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/info": {
|
|
"get": {
|
|
"summary": "Service info",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Info"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|