mirror of
https://github.com/mudler/LocalAI.git
synced 2026-09-25 07:34:58 -04:00
fix(swagger): describe backend metadata as an object
Swag cannot resolve json.RawMessage in OpenAIResponse and aborts the daily schema generation. Set its Swagger type without changing JSON encoding, and regenerate the checked-in specifications. Assisted-by: Codex:gpt-6
This commit is contained in:
1 parent
19a66fd898
commit
714140dd26
4 files changed
+9
-1
No files matched your search
@@ -99,7 +99,7 @@ type OpenAIResponse struct {
|
||||
// OpenAI-SDK consumers that filter on a truthy `result.usage`
|
||||
// (continuedev/continue, Kilo Code, Roo Code, etc.).
|
||||
Usage *OpenAIUsage `json:"usage,omitempty"`
|
||||
Metadata json.RawMessage `json:"metadata,omitempty"`
|
||||
Metadata json.RawMessage `json:"metadata,omitempty" swaggertype:"object"`
|
||||
}
|
||||
|
||||
// StreamOptions mirrors OpenAI's `stream_options` request field. The only
|
||||
|
||||
@@ -7313,6 +7313,9 @@ const docTemplate = `{
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object"
|
||||
},
|
||||
"model": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -7310,6 +7310,9 @@
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object"
|
||||
},
|
||||
"model": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
@@ -2266,6 +2266,8 @@ definitions:
|
||||
type: array
|
||||
id:
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
model:
|
||||
type: string
|
||||
object:
|
||||
|
||||
Reference in new issue
Block a user