mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-12 04:44:52 +00:00
update openAPI doc
This commit is contained in:
parent
c6133ebda7
commit
42713cd9c4
@ -10,7 +10,7 @@
|
||||
"name": "Apache 2.0",
|
||||
"url": "https://www.apache.org/licenses/LICENSE-2.0"
|
||||
},
|
||||
"version": "2.1.1-dev0"
|
||||
"version": "2.1.2-dev0"
|
||||
},
|
||||
"paths": {
|
||||
"/": {
|
||||
@ -492,12 +492,12 @@
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Completion"
|
||||
"$ref": "#/components/schemas/CompletionFinal"
|
||||
}
|
||||
},
|
||||
"text/event-stream": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CompletionCompleteChunk"
|
||||
"$ref": "#/components/schemas/Chunk"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -809,7 +809,6 @@
|
||||
"ChatRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"model",
|
||||
"messages"
|
||||
],
|
||||
"properties": {
|
||||
@ -854,7 +853,8 @@
|
||||
"model": {
|
||||
"type": "string",
|
||||
"description": "[UNUSED] ID of the model to use. See the model endpoint compatibility table for details on which models work with the Chat API.",
|
||||
"example": "mistralai/Mistral-7B-Instruct-v0.2"
|
||||
"example": "mistralai/Mistral-7B-Instruct-v0.2",
|
||||
"nullable": true
|
||||
},
|
||||
"n": {
|
||||
"type": "integer",
|
||||
@ -1116,7 +1116,6 @@
|
||||
"CompletionRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"model",
|
||||
"prompt"
|
||||
],
|
||||
"properties": {
|
||||
@ -1138,7 +1137,8 @@
|
||||
"model": {
|
||||
"type": "string",
|
||||
"description": "UNUSED\nID of the model to use. See the model endpoint compatibility table for details on which models work with the Chat API.",
|
||||
"example": "mistralai/Mistral-7B-Instruct-v0.2"
|
||||
"example": "mistralai/Mistral-7B-Instruct-v0.2",
|
||||
"nullable": true
|
||||
},
|
||||
"prompt": {
|
||||
"$ref": "#/components/schemas/Prompt"
|
||||
@ -1324,6 +1324,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"FunctionName": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"GenerateParameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -1708,6 +1719,72 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"MessageChunk": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"text",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"text"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"image_url",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"image_url": {
|
||||
"$ref": "#/components/schemas/Url"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"image_url"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"discriminator": {
|
||||
"propertyName": "type"
|
||||
}
|
||||
},
|
||||
"MessageContent": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/MessageChunk"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"OutputMessage": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/TextMessage"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/ToolCallMessage"
|
||||
}
|
||||
]
|
||||
},
|
||||
"PrefillToken": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@ -1834,6 +1911,23 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"TextMessage": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"role",
|
||||
"content"
|
||||
],
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string",
|
||||
"example": "My name is David and I"
|
||||
},
|
||||
"role": {
|
||||
"type": "string",
|
||||
"example": "user"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Token": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@ -1906,6 +2000,41 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"ToolCallDelta": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"role",
|
||||
"tool_calls"
|
||||
],
|
||||
"properties": {
|
||||
"role": {
|
||||
"type": "string",
|
||||
"example": "assistant"
|
||||
},
|
||||
"tool_calls": {
|
||||
"$ref": "#/components/schemas/DeltaToolCall"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ToolCallMessage": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"role",
|
||||
"tool_calls"
|
||||
],
|
||||
"properties": {
|
||||
"role": {
|
||||
"type": "string",
|
||||
"example": "assistant"
|
||||
},
|
||||
"tool_calls": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ToolCall"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ToolType": {
|
||||
"oneOf": [
|
||||
{
|
||||
@ -1929,6 +2058,17 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"Url": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"url"
|
||||
],
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Usage": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@ -1962,4 +2102,4 @@
|
||||
"description": "Hugging Face Text Generation Inference API"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user