Skip to content

Commit 97ee774

Browse files
committed
#153: Updated OpenAI specs
1 parent 80695d3 commit 97ee774

File tree

3 files changed

+44
-56
lines changed

3 files changed

+44
-56
lines changed

docs/docs.go

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,6 @@ const docTemplate = `{
201201
"description": "The content of the message.",
202202
"type": "string"
203203
},
204-
"name": {
205-
"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.",
206-
"type": "string"
207-
},
208204
"role": {
209205
"description": "The role of the author of this message. One of system, user, or assistant.",
210206
"type": "string"
@@ -227,7 +223,10 @@ const docTemplate = `{
227223
}
228224
},
229225
"override_params": {
230-
"$ref": "#/definitions/schemas.OverrideChatRequest"
226+
"type": "object",
227+
"additionalProperties": {
228+
"$ref": "#/definitions/schemas.ModelParamsOverride"
229+
}
231230
}
232231
}
233232
},
@@ -279,6 +278,19 @@ const docTemplate = `{
279278
}
280279
}
281280
},
281+
"schemas.ModelParamsOverride": {
282+
"type": "object",
283+
"properties": {
284+
"message": {
285+
"description": "TODO: should be just string?",
286+
"allOf": [
287+
{
288+
"$ref": "#/definitions/schemas.ChatMessage"
289+
}
290+
]
291+
}
292+
}
293+
},
282294
"schemas.ModelResponse": {
283295
"type": "object",
284296
"properties": {
@@ -296,21 +308,6 @@ const docTemplate = `{
296308
}
297309
}
298310
},
299-
"schemas.OverrideChatRequest": {
300-
"type": "object",
301-
"required": [
302-
"message",
303-
"model_id"
304-
],
305-
"properties": {
306-
"message": {
307-
"$ref": "#/definitions/schemas.ChatMessage"
308-
},
309-
"model_id": {
310-
"type": "string"
311-
}
312-
}
313-
},
314311
"schemas.RouterListSchema": {
315312
"type": "object",
316313
"properties": {

docs/swagger.json

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,6 @@
198198
"description": "The content of the message.",
199199
"type": "string"
200200
},
201-
"name": {
202-
"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.",
203-
"type": "string"
204-
},
205201
"role": {
206202
"description": "The role of the author of this message. One of system, user, or assistant.",
207203
"type": "string"
@@ -224,7 +220,10 @@
224220
}
225221
},
226222
"override_params": {
227-
"$ref": "#/definitions/schemas.OverrideChatRequest"
223+
"type": "object",
224+
"additionalProperties": {
225+
"$ref": "#/definitions/schemas.ModelParamsOverride"
226+
}
228227
}
229228
}
230229
},
@@ -276,6 +275,19 @@
276275
}
277276
}
278277
},
278+
"schemas.ModelParamsOverride": {
279+
"type": "object",
280+
"properties": {
281+
"message": {
282+
"description": "TODO: should be just string?",
283+
"allOf": [
284+
{
285+
"$ref": "#/definitions/schemas.ChatMessage"
286+
}
287+
]
288+
}
289+
}
290+
},
279291
"schemas.ModelResponse": {
280292
"type": "object",
281293
"properties": {
@@ -293,21 +305,6 @@
293305
}
294306
}
295307
},
296-
"schemas.OverrideChatRequest": {
297-
"type": "object",
298-
"required": [
299-
"message",
300-
"model_id"
301-
],
302-
"properties": {
303-
"message": {
304-
"$ref": "#/definitions/schemas.ChatMessage"
305-
},
306-
"model_id": {
307-
"type": "string"
308-
}
309-
}
310-
},
311308
"schemas.RouterListSchema": {
312309
"type": "object",
313310
"properties": {

docs/swagger.yaml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ definitions:
55
content:
66
description: The content of the message.
77
type: string
8-
name:
9-
description: |-
10-
The name of the author of this message. May contain a-z, A-Z, 0-9, and underscores,
11-
with a maximum length of 64 characters.
12-
type: string
138
role:
149
description: The role of the author of this message. One of system, user,
1510
or assistant.
@@ -27,7 +22,9 @@ definitions:
2722
$ref: '#/definitions/schemas.ChatMessage'
2823
type: array
2924
override_params:
30-
$ref: '#/definitions/schemas.OverrideChatRequest'
25+
additionalProperties:
26+
$ref: '#/definitions/schemas.ModelParamsOverride'
27+
type: object
3128
required:
3229
- message
3330
type: object
@@ -62,6 +59,13 @@ definitions:
6259
healthy:
6360
type: boolean
6461
type: object
62+
schemas.ModelParamsOverride:
63+
properties:
64+
message:
65+
allOf:
66+
- $ref: '#/definitions/schemas.ChatMessage'
67+
description: 'TODO: should be just string?'
68+
type: object
6569
schemas.ModelResponse:
6670
properties:
6771
message:
@@ -73,16 +77,6 @@ definitions:
7377
token_usage:
7478
$ref: '#/definitions/schemas.TokenUsage'
7579
type: object
76-
schemas.OverrideChatRequest:
77-
properties:
78-
message:
79-
$ref: '#/definitions/schemas.ChatMessage'
80-
model_id:
81-
type: string
82-
required:
83-
- message
84-
- model_id
85-
type: object
8680
schemas.RouterListSchema:
8781
properties:
8882
routers:

0 commit comments

Comments
 (0)