diff --git a/docs/openapi.json b/docs/openapi.json index 22b06720..e4c8ffdb 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -36,7 +36,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GenerateResponse" + "type": "array", + "items": { + "$ref": "#/components/schemas/GenerateResponse" + } } }, "text/event-stream": { diff --git a/router/src/server.rs b/router/src/server.rs index 2058bce3..a0bc1768 100644 --- a/router/src/server.rs +++ b/router/src/server.rs @@ -109,7 +109,7 @@ request_body = CompatGenerateRequest, responses( (status = 200, description = "Generated Text", content( -("application/json" = GenerateResponse), +("application/json" = Vec), ("text/event-stream" = StreamResponse), )), (status = 424, description = "Generation Error", body = ErrorResponse,