Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(swagger): update swagger #4802

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 3 additions & 27 deletions swagger/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -505,30 +505,6 @@ const docTemplate = `{
}
}
},
"/v1/completions": {
"post": {
"summary": "Generate completions for a given prompt and model.",
"parameters": [
{
"description": "query params",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.OpenAIRequest"
}
}
],
"responses": {
"200": {
"description": "Response",
"schema": {
"$ref": "#/definitions/schema.OpenAIResponse"
}
}
}
}
},
"/v1/edits": {
"post": {
"summary": "OpenAI edit endpoint",
Expand Down Expand Up @@ -1421,6 +1397,9 @@ const docTemplate = `{
"schema.JINARerankRequest": {
"type": "object",
"properties": {
"backend": {
"type": "string"
},
"documents": {
"type": "array",
"items": {
Expand Down Expand Up @@ -1630,7 +1609,6 @@ const docTemplate = `{
"type": "integer"
},
"model": {
"description": "Also part of the OpenAI official spec",
"type": "string"
},
"model_base_name": {
Expand Down Expand Up @@ -1836,7 +1814,6 @@ const docTemplate = `{
"type": "string"
},
"model": {
"description": "model name or full path",
"type": "string"
},
"response_format": {
Expand Down Expand Up @@ -1900,7 +1877,6 @@ const docTemplate = `{
}
},
"model": {
"description": "model name or full path",
"type": "string"
}
}
Expand Down
30 changes: 3 additions & 27 deletions swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -498,30 +498,6 @@
}
}
},
"/v1/completions": {
"post": {
"summary": "Generate completions for a given prompt and model.",
"parameters": [
{
"description": "query params",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.OpenAIRequest"
}
}
],
"responses": {
"200": {
"description": "Response",
"schema": {
"$ref": "#/definitions/schema.OpenAIResponse"
}
}
}
}
},
"/v1/edits": {
"post": {
"summary": "OpenAI edit endpoint",
Expand Down Expand Up @@ -1414,6 +1390,9 @@
"schema.JINARerankRequest": {
"type": "object",
"properties": {
"backend": {
"type": "string"
},
"documents": {
"type": "array",
"items": {
Expand Down Expand Up @@ -1623,7 +1602,6 @@
"type": "integer"
},
"model": {
"description": "Also part of the OpenAI official spec",
"type": "string"
},
"model_base_name": {
Expand Down Expand Up @@ -1829,7 +1807,6 @@
"type": "string"
},
"model": {
"description": "model name or full path",
"type": "string"
},
"response_format": {
Expand Down Expand Up @@ -1893,7 +1870,6 @@
}
},
"model": {
"description": "model name or full path",
"type": "string"
}
}
Expand Down
20 changes: 2 additions & 18 deletions swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ definitions:
type: object
schema.JINARerankRequest:
properties:
backend:
type: string
documents:
items:
type: string
Expand Down Expand Up @@ -551,7 +553,6 @@ definitions:
description: Image (not supported by OpenAI)
type: integer
model:
description: Also part of the OpenAI official spec
type: string
model_base_name:
description: AutoGPTQ
Expand Down Expand Up @@ -696,7 +697,6 @@ definitions:
description: (optional) language to use with TTS model
type: string
model:
description: model name or full path
type: string
response_format:
description: (optional) output format
Expand Down Expand Up @@ -739,7 +739,6 @@ definitions:
type: number
type: array
model:
description: model name or full path
type: string
type: object
info:
Expand Down Expand Up @@ -1059,21 +1058,6 @@ paths:
schema:
$ref: '#/definitions/schema.OpenAIResponse'
summary: Generate a chat completions for a given prompt and model.
/v1/completions:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dave-gray101 this is quite weird, swagger seems confused and doesn't see anymore the completions endpoint

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reason found: it was a space between the comment confusing swagger 😅 . Fixed in #4805

post:
parameters:
- description: query params
in: body
name: request
required: true
schema:
$ref: '#/definitions/schema.OpenAIRequest'
responses:
"200":
description: Response
schema:
$ref: '#/definitions/schema.OpenAIResponse'
summary: Generate completions for a given prompt and model.
/v1/edits:
post:
parameters:
Expand Down
Loading