mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-15 06:16:10 +00:00
- Add config.get, skills.list WS contract tests - Add /v1/providers HTTP contract test - Add JSON schemas for ws_connect, ws_chat_send, http_chat_completions - Document breaking change policy
41 lines
1.1 KiB
JSON
41 lines
1.1 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "POST /v1/chat/completions response (OpenAI-compatible)",
|
|
"type": "object",
|
|
"required": ["id", "object", "created", "model", "choices"],
|
|
"properties": {
|
|
"id": { "type": "string" },
|
|
"object": { "type": "string", "const": "chat.completion" },
|
|
"created": { "type": "number" },
|
|
"model": { "type": "string" },
|
|
"choices": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["index", "message", "finish_reason"],
|
|
"properties": {
|
|
"index": { "type": "number" },
|
|
"message": {
|
|
"type": "object",
|
|
"required": ["role", "content"],
|
|
"properties": {
|
|
"role": { "type": "string" },
|
|
"content": { "type": "string" }
|
|
}
|
|
},
|
|
"finish_reason": { "type": "string" }
|
|
}
|
|
}
|
|
},
|
|
"usage": {
|
|
"type": "object",
|
|
"properties": {
|
|
"prompt_tokens": { "type": "number" },
|
|
"completion_tokens": { "type": "number" },
|
|
"total_tokens": { "type": "number" }
|
|
}
|
|
}
|
|
}
|
|
}
|