Unverified Commit 926fd9a0 authored by Sai Vinay G's avatar Sai Vinay G Committed by GitHub
Browse files

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

parent e9b01b34
...@@ -37,7 +37,11 @@ use utoipa_swagger_ui::SwaggerUi; ...@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment