feat(router): Adding response schema for compat_generate (#292)
This commit is contained in:
parent
e9b01b3433
commit
926fd9a010
|
@ -37,7 +37,11 @@ use utoipa_swagger_ui::SwaggerUi;
|
||||||
path = "/",
|
path = "/",
|
||||||
request_body = CompatGenerateRequest,
|
request_body = CompatGenerateRequest,
|
||||||
responses(
|
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,
|
(status = 424, description = "Generation Error", body = ErrorResponse,
|
||||||
example = json ! ({"error": "Request failed during generation"})),
|
example = json ! ({"error": "Request failed during generation"})),
|
||||||
(status = 429, description = "Model is overloaded", body = ErrorResponse,
|
(status = 429, description = "Model is overloaded", body = ErrorResponse,
|
||||||
|
|
Loading…
Reference in New Issue