Skip to content

fix: typo assistant -> assistant_deleted #711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 7, 2023
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
4 changes: 2 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Methods:
Types:

```python
from openai.types.beta import Assistant, AssitantDeleted
from openai.types.beta import Assistant, AssistantDeleted
```

Methods:
Expand All @@ -206,7 +206,7 @@ Methods:
- <code title="get /assistants/{assistant_id}">client.beta.assistants.<a href="./src/openai/resources/beta/assistants/assistants.py">retrieve</a>(assistant_id) -> <a href="./src/openai/types/beta/assistant.py">Assistant</a></code>
- <code title="post /assistants/{assistant_id}">client.beta.assistants.<a href="./src/openai/resources/beta/assistants/assistants.py">update</a>(assistant_id, \*\*<a href="src/openai/types/beta/assistant_update_params.py">params</a>) -> <a href="./src/openai/types/beta/assistant.py">Assistant</a></code>
- <code title="get /assistants">client.beta.assistants.<a href="./src/openai/resources/beta/assistants/assistants.py">list</a>(\*\*<a href="src/openai/types/beta/assistant_list_params.py">params</a>) -> <a href="./src/openai/types/beta/assistant.py">SyncCursorPage[Assistant]</a></code>
- <code title="delete /assistants/{assistant_id}">client.beta.assistants.<a href="./src/openai/resources/beta/assistants/assistants.py">delete</a>(assistant_id) -> <a href="./src/openai/types/beta/assitant_deleted.py">AssitantDeleted</a></code>
- <code title="delete /assistants/{assistant_id}">client.beta.assistants.<a href="./src/openai/resources/beta/assistants/assistants.py">delete</a>(assistant_id) -> <a href="./src/openai/types/beta/assistant_deleted.py">AssistantDeleted</a></code>

### Files

Expand Down
10 changes: 5 additions & 5 deletions src/openai/resources/beta/assistants/assistants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.

Expand All @@ -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,
)


Expand Down Expand Up @@ -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.

Expand All @@ -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,
)


Expand Down
2 changes: 1 addition & 1 deletion src/openai/types/beta/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

from ..._models import BaseModel

__all__ = ["AssitantDeleted"]
__all__ = ["AssistantDeleted"]


class AssitantDeleted(BaseModel):
class AssistantDeleted(BaseModel):
id: str

deleted: bool
Expand Down
10 changes: 5 additions & 5 deletions tests/api_resources/beta/test_assistants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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"])