From b0a645b1b64e583aa4c229a37ae61051ec386417 Mon Sep 17 00:00:00 2001 From: Ekene Ashinze Date: Tue, 9 Dec 2025 21:42:07 +0000 Subject: [PATCH] feat: Add description field to SettingsResponse --- docs/api_reference.md | 1 + src/fastapi_poe/types.py | 2 ++ tests/test_types.py | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/docs/api_reference.md b/docs/api_reference.md index 6862742..b3792ad 100644 --- a/docs/api_reference.md +++ b/docs/api_reference.md @@ -565,6 +565,7 @@ Anthropic. messages if there is a multientity context. - `parameter_controls` (`Optional[ParameterControls] = None`): Optional JSON object that defines interactive parameter controls. The object must contain an api_version and sections array. +- `description` (`str = ""`): A description of the bot. diff --git a/src/fastapi_poe/types.py b/src/fastapi_poe/types.py index f255ff2..6d1f4d2 100644 --- a/src/fastapi_poe/types.py +++ b/src/fastapi_poe/types.py @@ -677,6 +677,7 @@ class SettingsResponse(BaseModel): messages if there is a multientity context. - `parameter_controls` (`Optional[ParameterControls] = None`): Optional JSON object that defines interactive parameter controls. The object must contain an api_version and sections array. + - `description` (`str = ""`): A description of the bot. """ @@ -697,6 +698,7 @@ class SettingsResponse(BaseModel): rate_card: Optional[str] = None cost_label: Optional[str] = None parameter_controls: Optional[ParameterControls] = None + description: Optional[str] = None class AttachmentUploadResponse(BaseModel): diff --git a/tests/test_types.py b/tests/test_types.py index 0b66ced..814b160 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -20,6 +20,10 @@ def test_default_response_version(self) -> None: response = SettingsResponse() assert response.response_version == 2 + def test_description(self) -> None: + response = SettingsResponse(description="My bot description") + assert response.description == "My bot description" + def test_extra_attrs() -> None: with pytest.raises(pydantic.ValidationError):