Skip to content

Commit dcf6596

Browse files
committed
Field for NotAvailableResponse
1 parent d97fc57 commit dcf6596

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/models/responses.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,20 @@ class LivenessResponse(BaseModel):
313313
class NotAvailableResponse(BaseModel):
314314
"""Model representing error response for readiness endpoint."""
315315

316-
detail: dict[str, str]
316+
detail: dict[str, str] = Field(
317+
...,
318+
description="Detailed information about readiness state",
319+
examples=[
320+
{
321+
"response": "Service is not ready",
322+
"cause": "Index is not ready",
323+
},
324+
{
325+
"response": "Service is not ready",
326+
"cause": "LLM is not ready",
327+
},
328+
],
329+
)
317330

318331
# provides examples for /docs endpoint
319332
model_config = {

0 commit comments

Comments
 (0)