From a45402cba1a1338cd7472285516908937726ff61 Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Tue, 7 Nov 2023 13:04:47 +0000 Subject: [PATCH] fix: typo assistant -> assistant_deleted (#711) --- api.md | 4 ++-- src/openai/resources/beta/assistants/assistants.py | 10 +++++----- src/openai/types/beta/__init__.py | 2 +- .../beta/{assitant_deleted.py => assistant_deleted.py} | 4 ++-- tests/api_resources/beta/test_assistants.py | 10 +++++----- 5 files changed, 15 insertions(+), 15 deletions(-) rename src/openai/types/beta/{assitant_deleted.py => assistant_deleted.py} (75%) diff --git a/api.md b/api.md index a23f34c050..95e9922129 100644 --- a/api.md +++ b/api.md @@ -197,7 +197,7 @@ Methods: Types: ```python -from openai.types.beta import Assistant, AssitantDeleted +from openai.types.beta import Assistant, AssistantDeleted ``` Methods: @@ -206,7 +206,7 @@ Methods: - client.beta.assistants.retrieve(assistant_id) -> Assistant - client.beta.assistants.update(assistant_id, \*\*params) -> Assistant - client.beta.assistants.list(\*\*params) -> SyncCursorPage[Assistant] -- client.beta.assistants.delete(assistant_id) -> AssitantDeleted +- client.beta.assistants.delete(assistant_id) -> AssistantDeleted ### Files diff --git a/src/openai/resources/beta/assistants/assistants.py b/src/openai/resources/beta/assistants/assistants.py index 485efdb105..efa711ecf4 100644 --- a/src/openai/resources/beta/assistants/assistants.py +++ b/src/openai/resources/beta/assistants/assistants.py @@ -15,7 +15,7 @@ from ....pagination import SyncCursorPage, AsyncCursorPage from ....types.beta import ( Assistant, - AssitantDeleted, + AssistantDeleted, assistant_list_params, assistant_create_params, assistant_update_params, @@ -298,7 +298,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AssitantDeleted: + ) -> AssistantDeleted: """ Delete an assistant. @@ -317,7 +317,7 @@ def delete( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=AssitantDeleted, + cast_to=AssistantDeleted, ) @@ -591,7 +591,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AssitantDeleted: + ) -> AssistantDeleted: """ Delete an assistant. @@ -610,7 +610,7 @@ async def delete( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=AssitantDeleted, + cast_to=AssistantDeleted, ) diff --git a/src/openai/types/beta/__init__.py b/src/openai/types/beta/__init__.py index dec4733a42..c03d823b8c 100644 --- a/src/openai/types/beta/__init__.py +++ b/src/openai/types/beta/__init__.py @@ -5,7 +5,7 @@ from .thread import Thread as Thread from .assistant import Assistant as Assistant from .thread_deleted import ThreadDeleted as ThreadDeleted -from .assitant_deleted import AssitantDeleted as AssitantDeleted +from .assistant_deleted import AssistantDeleted as AssistantDeleted from .thread_create_params import ThreadCreateParams as ThreadCreateParams from .thread_update_params import ThreadUpdateParams as ThreadUpdateParams from .assistant_list_params import AssistantListParams as AssistantListParams diff --git a/src/openai/types/beta/assitant_deleted.py b/src/openai/types/beta/assistant_deleted.py similarity index 75% rename from src/openai/types/beta/assitant_deleted.py rename to src/openai/types/beta/assistant_deleted.py index a5e5381d3a..23802caaf6 100644 --- a/src/openai/types/beta/assitant_deleted.py +++ b/src/openai/types/beta/assistant_deleted.py @@ -4,10 +4,10 @@ from ..._models import BaseModel -__all__ = ["AssitantDeleted"] +__all__ = ["AssistantDeleted"] -class AssitantDeleted(BaseModel): +class AssistantDeleted(BaseModel): id: str deleted: bool diff --git a/tests/api_resources/beta/test_assistants.py b/tests/api_resources/beta/test_assistants.py index dad7af7292..82e975b46d 100644 --- a/tests/api_resources/beta/test_assistants.py +++ b/tests/api_resources/beta/test_assistants.py @@ -10,7 +10,7 @@ from tests.utils import assert_matches_type from openai._client import OpenAI, AsyncOpenAI from openai.pagination import SyncCursorPage, AsyncCursorPage -from openai.types.beta import Assistant, AssitantDeleted +from openai.types.beta import Assistant, AssistantDeleted base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") api_key = "My API Key" @@ -123,7 +123,7 @@ def test_method_delete(self, client: OpenAI) -> None: assistant = client.beta.assistants.delete( "string", ) - assert_matches_type(AssitantDeleted, assistant, path=["response"]) + assert_matches_type(AssistantDeleted, assistant, path=["response"]) @parametrize def test_raw_response_delete(self, client: OpenAI) -> None: @@ -132,7 +132,7 @@ def test_raw_response_delete(self, client: OpenAI) -> None: ) assert response.http_request.headers.get("X-Stainless-Lang") == "python" assistant = response.parse() - assert_matches_type(AssitantDeleted, assistant, path=["response"]) + assert_matches_type(AssistantDeleted, assistant, path=["response"]) class TestAsyncAssistants: @@ -242,7 +242,7 @@ async def test_method_delete(self, client: AsyncOpenAI) -> None: assistant = await client.beta.assistants.delete( "string", ) - assert_matches_type(AssitantDeleted, assistant, path=["response"]) + assert_matches_type(AssistantDeleted, assistant, path=["response"]) @parametrize async def test_raw_response_delete(self, client: AsyncOpenAI) -> None: @@ -251,4 +251,4 @@ async def test_raw_response_delete(self, client: AsyncOpenAI) -> None: ) assert response.http_request.headers.get("X-Stainless-Lang") == "python" assistant = response.parse() - assert_matches_type(AssitantDeleted, assistant, path=["response"]) + assert_matches_type(AssistantDeleted, assistant, path=["response"])