Skip to content

Commit

Permalink
#153: Updated OpenAI specs
Browse files Browse the repository at this point in the history
  • Loading branch information
roma-glushko committed Jun 4, 2024
1 parent 80695d3 commit 97ee774
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 56 deletions.
37 changes: 17 additions & 20 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,6 @@ const docTemplate = `{
"description": "The content of the message.",
"type": "string"
},
"name": {
"description": "The name of the author of this message. May contain a-z, A-Z, 0-9, and underscores,\nwith a maximum length of 64 characters.",
"type": "string"
},
"role": {
"description": "The role of the author of this message. One of system, user, or assistant.",
"type": "string"
Expand All @@ -227,7 +223,10 @@ const docTemplate = `{
}
},
"override_params": {
"$ref": "#/definitions/schemas.OverrideChatRequest"
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/schemas.ModelParamsOverride"
}
}
}
},
Expand Down Expand Up @@ -279,6 +278,19 @@ const docTemplate = `{
}
}
},
"schemas.ModelParamsOverride": {
"type": "object",
"properties": {
"message": {
"description": "TODO: should be just string?",
"allOf": [
{
"$ref": "#/definitions/schemas.ChatMessage"
}
]
}
}
},
"schemas.ModelResponse": {
"type": "object",
"properties": {
Expand All @@ -296,21 +308,6 @@ const docTemplate = `{
}
}
},
"schemas.OverrideChatRequest": {
"type": "object",
"required": [
"message",
"model_id"
],
"properties": {
"message": {
"$ref": "#/definitions/schemas.ChatMessage"
},
"model_id": {
"type": "string"
}
}
},
"schemas.RouterListSchema": {
"type": "object",
"properties": {
Expand Down
37 changes: 17 additions & 20 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,6 @@
"description": "The content of the message.",
"type": "string"
},
"name": {
"description": "The name of the author of this message. May contain a-z, A-Z, 0-9, and underscores,\nwith a maximum length of 64 characters.",
"type": "string"
},
"role": {
"description": "The role of the author of this message. One of system, user, or assistant.",
"type": "string"
Expand All @@ -224,7 +220,10 @@
}
},
"override_params": {
"$ref": "#/definitions/schemas.OverrideChatRequest"
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/schemas.ModelParamsOverride"
}
}
}
},
Expand Down Expand Up @@ -276,6 +275,19 @@
}
}
},
"schemas.ModelParamsOverride": {
"type": "object",
"properties": {
"message": {
"description": "TODO: should be just string?",
"allOf": [
{
"$ref": "#/definitions/schemas.ChatMessage"
}
]
}
}
},
"schemas.ModelResponse": {
"type": "object",
"properties": {
Expand All @@ -293,21 +305,6 @@
}
}
},
"schemas.OverrideChatRequest": {
"type": "object",
"required": [
"message",
"model_id"
],
"properties": {
"message": {
"$ref": "#/definitions/schemas.ChatMessage"
},
"model_id": {
"type": "string"
}
}
},
"schemas.RouterListSchema": {
"type": "object",
"properties": {
Expand Down
26 changes: 10 additions & 16 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ definitions:
content:
description: The content of the message.
type: string
name:
description: |-
The name of the author of this message. May contain a-z, A-Z, 0-9, and underscores,
with a maximum length of 64 characters.
type: string
role:
description: The role of the author of this message. One of system, user,
or assistant.
Expand All @@ -27,7 +22,9 @@ definitions:
$ref: '#/definitions/schemas.ChatMessage'
type: array
override_params:
$ref: '#/definitions/schemas.OverrideChatRequest'
additionalProperties:
$ref: '#/definitions/schemas.ModelParamsOverride'
type: object
required:
- message
type: object
Expand Down Expand Up @@ -62,6 +59,13 @@ definitions:
healthy:
type: boolean
type: object
schemas.ModelParamsOverride:
properties:
message:
allOf:
- $ref: '#/definitions/schemas.ChatMessage'
description: 'TODO: should be just string?'
type: object
schemas.ModelResponse:
properties:
message:
Expand All @@ -73,16 +77,6 @@ definitions:
token_usage:
$ref: '#/definitions/schemas.TokenUsage'
type: object
schemas.OverrideChatRequest:
properties:
message:
$ref: '#/definitions/schemas.ChatMessage'
model_id:
type: string
required:
- message
- model_id
type: object
schemas.RouterListSchema:
properties:
routers:
Expand Down

0 comments on commit 97ee774

Please sign in to comment.