Skip to content

Commit

Permalink
feat(swagger): update swagger (#4735)
Browse files Browse the repository at this point in the history
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
  • Loading branch information
localai-bot and mudler authored Feb 3, 2025
1 parent a37fa8d commit 52faded
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
22 changes: 22 additions & 0 deletions swagger/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,17 @@ const docTemplate = `{
"/v1/tokenize": {
"post": {
"summary": "Tokenize the input.",
"parameters": [
{
"description": "Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.TokenizeRequest"
}
}
],
"responses": {
"200": {
"description": "Response",
Expand Down Expand Up @@ -1838,6 +1849,17 @@ const docTemplate = `{
}
}
},
"schema.TokenizeRequest": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"model": {
"type": "string"
}
}
},
"schema.TokenizeResponse": {
"type": "object",
"properties": {
Expand Down
22 changes: 22 additions & 0 deletions swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,17 @@
"/v1/tokenize": {
"post": {
"summary": "Tokenize the input.",
"parameters": [
{
"description": "Request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.TokenizeRequest"
}
}
],
"responses": {
"200": {
"description": "Response",
Expand Down Expand Up @@ -1831,6 +1842,17 @@
}
}
},
"schema.TokenizeRequest": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"model": {
"type": "string"
}
}
},
"schema.TokenizeResponse": {
"type": "object",
"properties": {
Expand Down
14 changes: 14 additions & 0 deletions swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,13 @@ definitions:
description: voice audio file or speaker id
type: string
type: object
schema.TokenizeRequest:
properties:
content:
type: string
model:
type: string
type: object
schema.TokenizeResponse:
properties:
tokens:
Expand Down Expand Up @@ -1216,6 +1223,13 @@ paths:
summary: Get TokenMetrics for Active Slot.
/v1/tokenize:
post:
parameters:
- description: Request
in: body
name: request
required: true
schema:
$ref: '#/definitions/schema.TokenizeRequest'
responses:
"200":
description: Response
Expand Down

0 comments on commit 52faded

Please sign in to comment.