curl --request POST \
--url http://co-mind-platform-host/v1/knowledgebase/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-4o-mini",
"messages": [
{
"role": "system",
"content": "<string>",
"name": "<string>"
}
],
"knowledgebase_ids": [
"kb_abc123",
"kb_def456"
],
"temperature": 1,
"max_tokens": 2,
"top_p": 1,
"stream": false
}
'{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 123,
"model": "<string>",
"choices": [
{
"index": 123,
"message": {
"role": "system",
"content": "<string>",
"name": "<string>"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
},
"knowledge_base_context": {
"sources": [
{
"knowledgebase_id": "<string>",
"document_id": "<string>",
"title": "<string>",
"content": "<string>",
"page": 123,
"relevance_score": 123
}
]
}
}OpenAI-compatible chat endpoint with knowledge base RAG support (stateless)
curl --request POST \
--url http://co-mind-platform-host/v1/knowledgebase/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-4o-mini",
"messages": [
{
"role": "system",
"content": "<string>",
"name": "<string>"
}
],
"knowledgebase_ids": [
"kb_abc123",
"kb_def456"
],
"temperature": 1,
"max_tokens": 2,
"top_p": 1,
"stream": false
}
'{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 123,
"model": "<string>",
"choices": [
{
"index": 123,
"message": {
"role": "system",
"content": "<string>",
"name": "<string>"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
},
"knowledge_base_context": {
"sources": [
{
"knowledgebase_id": "<string>",
"document_id": "<string>",
"title": "<string>",
"content": "<string>",
"page": 123,
"relevance_score": 123
}
]
}
}Bearer token authentication. Supports two token types:
POST /v1/auth/loginPOST /v1/api-tokens, format: cmnd_<tokenId>.<secret>"gpt-4o-mini"
Show child attributes
Knowledge base IDs to use for context
["kb_abc123", "kb_def456"]0 <= x <= 2x >= 10 <= x <= 1