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",
|
"name": "Apache 2.0",
|
||||||
"url": "https://www.apache.org/licenses/LICENSE-2.0"
|
"url": "https://www.apache.org/licenses/LICENSE-2.0"
|
||||||
},
|
},
|
||||||
"version": "2.1.1-dev0"
|
"version": "2.1.2-dev0"
|
||||||
},
|
},
|
||||||
"paths": {
|
"paths": {
|
||||||
"/": {
|
"/": {
|
||||||
@ -492,12 +492,12 @@
|
|||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/Completion"
|
"$ref": "#/components/schemas/CompletionFinal"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"text/event-stream": {
|
"text/event-stream": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/CompletionCompleteChunk"
|
"$ref": "#/components/schemas/Chunk"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -809,7 +809,6 @@
|
|||||||
"ChatRequest": {
|
"ChatRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"model",
|
|
||||||
"messages"
|
"messages"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -854,7 +853,8 @@
|
|||||||
"model": {
|
"model": {
|
||||||
"type": "string",
|
"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.",
|
"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": {
|
"n": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@ -1116,7 +1116,6 @@
|
|||||||
"CompletionRequest": {
|
"CompletionRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"model",
|
|
||||||
"prompt"
|
"prompt"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -1138,7 +1137,8 @@
|
|||||||
"model": {
|
"model": {
|
||||||
"type": "string",
|
"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.",
|
"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": {
|
"prompt": {
|
||||||
"$ref": "#/components/schemas/Prompt"
|
"$ref": "#/components/schemas/Prompt"
|
||||||
@ -1324,6 +1324,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"FunctionName": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"name"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"GenerateParameters": {
|
"GenerateParameters": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"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": {
|
"PrefillToken": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"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": {
|
"Token": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"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": {
|
"ToolType": {
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
{
|
{
|
||||||
@ -1929,6 +2058,17 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"Url": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"url"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"url": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"Usage": {
|
"Usage": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
|
Loading…
Reference in New Issue
Block a user