Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2240,18 +2240,29 @@
"properties": {
"ready": {
"type": "boolean",
"title": "Ready"
"title": "Ready",
"description": "Flag indicating if service is ready",
"examples": [
true,
false
]
},
"reason": {
"type": "string",
"title": "Reason"
"title": "Reason",
"description": "The reason for the readiness",
"examples": [
"Service is ready"
]
},
"providers": {
"items": {
"$ref": "#/components/schemas/ProviderHealthStatus"
},
"type": "array",
"title": "Providers"
"title": "Providers",
"description": "List of unhealthy providers in case of readiness failure.",
"examples": []
}
},
"type": "object",
Expand Down
8 changes: 4 additions & 4 deletions docs/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ Examples:
feedback_request = FeedbackRequest(
conversation_id="12345678-abcd-0000-0123-456789abcdef",
user_question="what are you doing?",
user_feedback="Great service!",
user_feedback="This response is not helpful",
llm_response="I don't know",
sentiment=1
)
Expand Down Expand Up @@ -1124,9 +1124,9 @@ Example:

| Field | Type | Description |
|-------|------|-------------|
| ready | boolean | |
| reason | string | |
| providers | array | |
| ready | boolean | Flag indicating if service is ready |
| reason | string | The reason for the readiness |
| providers | array | List of unhealthy providers in case of readiness failure. |


## SQLiteDatabaseConfiguration
Expand Down
6 changes: 3 additions & 3 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -1114,9 +1114,9 @@ Example:

| Field | Type | Description |
|-------|------|-------------|
| ready | boolean | |
| reason | string | |
| providers | array | |
| ready | boolean | Flag indicating if service is ready |
| reason | string | The reason for the readiness |
| providers | array | List of unhealthy providers in case of readiness failure. |


## SQLiteDatabaseConfiguration
Expand Down
20 changes: 17 additions & 3 deletions src/models/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,23 @@ class ReadinessResponse(BaseModel):
```
"""

ready: bool
reason: str
providers: list[ProviderHealthStatus]
ready: bool = Field(
...,
description="Flag indicating if service is ready",
examples=[True, False],
)

reason: str = Field(
...,
description="The reason for the readiness",
examples=["Service is ready"],
)

providers: list[ProviderHealthStatus] = Field(
...,
description="List of unhealthy providers in case of readiness failure.",
examples=[],
)

# provides examples for /docs endpoint
model_config = {
Expand Down