feat(router): Adding response schema for compat_generate (#292)

This commit is contained in:
Sai Vinay G 2023-05-09 16:08:09 +05:30 committed by GitHub
parent e9b01b3433
commit 926fd9a010
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -37,7 +37,11 @@ use utoipa_swagger_ui::SwaggerUi;
path = "/",
request_body = CompatGenerateRequest,
responses(
(status = 200, description = "See /generate or /generate_stream"),
(status = 200, description = "See /generate or /generate_stream",
content(
("application/json" = GenerateResponse),
("text/event-stream" = StreamResponse),
)),
(status = 424, description = "Generation Error", body = ErrorResponse,
example = json ! ({"error": "Request failed during generation"})),
(status = 429, description = "Model is overloaded", body = ErrorResponse,