This commit is contained in:
OlivierDehaene 2023-03-09 15:11:16 +01:00
parent 8d7a0c1992
commit a448acbfbe
2 changed files with 145 additions and 72 deletions

View File

@ -210,13 +210,62 @@
}, },
"components": { "components": {
"schemas": { "schemas": {
"BestOfSequence": {
"type": "object",
"required": [
"generated_text",
"finish_reason",
"generated_tokens",
"prefill",
"tokens"
],
"properties": {
"finish_reason": {
"$ref": "#/components/schemas/FinishReason"
},
"generated_text": {
"type": "string",
"example": "test"
},
"generated_tokens": {
"type": "integer",
"format": "int32",
"example": 1
},
"prefill": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PrefillToken"
}
},
"seed": {
"type": "integer",
"format": "int64",
"example": 42
},
"tokens": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Token"
}
}
}
},
"Details": { "Details": {
"type": "object", "type": "object",
"required": [ "required": [
"finish_reason", "finish_reason",
"generated_tokens" "generated_tokens",
"prefill",
"tokens"
], ],
"properties": { "properties": {
"best_of_sequences": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BestOfSequence"
}
},
"finish_reason": { "finish_reason": {
"$ref": "#/components/schemas/FinishReason" "$ref": "#/components/schemas/FinishReason"
}, },
@ -247,11 +296,15 @@
"ErrorResponse": { "ErrorResponse": {
"type": "object", "type": "object",
"required": [ "required": [
"error" "error",
"error_type"
], ],
"properties": { "properties": {
"error": { "error": {
"type": "string" "type": "string"
},
"error_type": {
"type": "string"
} }
} }
}, },
@ -266,6 +319,13 @@
"GenerateParameters": { "GenerateParameters": {
"type": "object", "type": "object",
"properties": { "properties": {
"best_of": {
"type": "integer",
"default": "null",
"example": 1,
"nullable": true,
"exclusiveMinimum": 0.0
},
"details": { "details": {
"type": "boolean", "type": "boolean",
"default": "true" "default": "true"
@ -297,7 +357,11 @@
}, },
"seed": { "seed": {
"type": "integer", "type": "integer",
"format": "int64" "format": "int64",
"default": "null",
"example": "null",
"nullable": true,
"exclusiveMinimum": 0.0
}, },
"stop": { "stop": {
"type": "array", "type": "array",
@ -334,6 +398,15 @@
"maximum": 1.0, "maximum": 1.0,
"exclusiveMinimum": 0.0 "exclusiveMinimum": 0.0
}, },
"typical_p": {
"type": "number",
"format": "float",
"default": "null",
"example": 0.95,
"nullable": true,
"maximum": 1.0,
"exclusiveMinimum": 0.0
},
"watermark": { "watermark": {
"type": "boolean", "type": "boolean",
"default": "false", "default": "false",