diff --git a/docs/openapi.json b/docs/openapi.json index 89ffa0d7..f8e52a8d 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -637,6 +637,35 @@ } } }, + "ChatCompletionComplete": { + "type": "object", + "required": [ + "index", + "message", + "finish_reason" + ], + "properties": { + "finish_reason": { + "type": "string" + }, + "index": { + "type": "integer", + "format": "int32", + "minimum": 0 + }, + "logprobs": { + "allOf": [ + { + "$ref": "#/components/schemas/ChatCompletionLogprobs" + } + ], + "nullable": true + }, + "message": { + "$ref": "#/components/schemas/Message" + } + } + }, "ChatCompletionDelta": { "type": "object", "required": [ @@ -654,6 +683,59 @@ } } }, + "ChatCompletionLogprob": { + "type": "object", + "required": [ + "token", + "logprob", + "top_logprobs" + ], + "properties": { + "logprob": { + "type": "number", + "format": "float" + }, + "token": { + "type": "string" + }, + "top_logprobs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatCompletionTopLogprob" + } + } + } + }, + "ChatCompletionLogprobs": { + "type": "object", + "required": [ + "content" + ], + "properties": { + "content": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChatCompletionLogprob" + } + } + } + }, + "ChatCompletionTopLogprob": { + "type": "object", + "required": [ + "token", + "logprob" + ], + "properties": { + "logprob": { + "type": "number", + "format": "float" + }, + "token": { + "type": "string" + } + } + }, "ChatRequest": { "type": "object", "required": [ @@ -1038,15 +1120,7 @@ ] }, "value": { - "type": "string", - "description": "A string that represents a [JSON Schema](https://json-schema.org/).\n\nJSON Schema is a declarative language that allows to annotate JSON documents\nwith types and descriptions.", - "example": { - "properties": { - "location": { - "type": "string" - } - } - } + "description": "A string that represents a [JSON Schema](https://json-schema.org/).\n\nJSON Schema is a declarative language that allows to annotate JSON documents\nwith types and descriptions." } } }, @@ -1362,6 +1436,31 @@ "items": { "$ref": "#/components/schemas/SimpleToken" } + }, + "Usage": { + "type": "object", + "required": [ + "prompt_tokens", + "completion_tokens", + "total_tokens" + ], + "properties": { + "completion_tokens": { + "type": "integer", + "format": "int32", + "minimum": 0 + }, + "prompt_tokens": { + "type": "integer", + "format": "int32", + "minimum": 0 + }, + "total_tokens": { + "type": "integer", + "format": "int32", + "minimum": 0 + } + } } } },