forked from phoenix/litellm-mirror
(docs) openapi.json fix ChatCompletion Response output
This commit is contained in:
parent
474825210a
commit
ba106a776b
1 changed files with 57 additions and 49 deletions
|
@ -176,58 +176,66 @@
|
||||||
"required": ["messages", "model"]
|
"required": ["messages", "model"]
|
||||||
},
|
},
|
||||||
"ChatCompletionsResponse": {
|
"ChatCompletionsResponse": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"object": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"choices": {
|
"choices": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"finish_reason": {
|
"finish_reason": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
|
||||||
"index": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"message": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"created": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"model": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"object": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": ["created", "model", "object"]
|
|
||||||
},
|
|
||||||
"usage": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"completion_tokens": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"prompt_tokens": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"total_tokens": {
|
|
||||||
"type": "integer"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": ["completion_tokens", "prompt_tokens", "total_tokens"]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"required": ["finish_reason", "index", "message", "usage"]
|
"index": {
|
||||||
}
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"content": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["content", "role"]
|
||||||
|
},
|
||||||
|
"usage": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"prompt_tokens": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"completion_tokens": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"total_tokens": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["prompt_tokens", "completion_tokens", "total_tokens"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["finish_reason", "index", "message", "usage"]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"created": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"model": {
|
||||||
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"required": ["object", "choices", "id", "created", "model"]
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue