From bcf554f82d2c064776caf19296e865d9794ca7f0 Mon Sep 17 00:00:00 2001 From: vuittont60 <81072379+vuittont60@users.noreply.github.com> Date: Tue, 19 Dec 2023 11:21:35 +0800 Subject: [PATCH] chore(src): fix typos --- src/openai/_base_client.py | 2 +- src/openai/_streaming.py | 4 ++-- src/openai/cli/_api/completions.py | 2 +- src/openai/resources/beta/assistants/assistants.py | 4 ++-- src/openai/types/beta/assistant_update_params.py | 2 +- src/openai/types/moderation.py | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/openai/_base_client.py b/src/openai/_base_client.py index 92189617b5..481171a447 100644 --- a/src/openai/_base_client.py +++ b/src/openai/_base_client.py @@ -107,7 +107,7 @@ class PageInfo: - """Stores the necesary information to build the request to retrieve the next page. + """Stores the necessary information to build the request to retrieve the next page. Either `url` or `params` must be set. """ diff --git a/src/openai/_streaming.py b/src/openai/_streaming.py index e48324fc78..0f7aa467a3 100644 --- a/src/openai/_streaming.py +++ b/src/openai/_streaming.py @@ -57,7 +57,7 @@ def __stream__(self) -> Iterator[ResponseT]: data = sse.json() if is_mapping(data) and data.get("error"): raise APIError( - message="An error ocurred during streaming", + message="An error occurred during streaming", request=self.response.request, body=data["error"], ) @@ -112,7 +112,7 @@ async def __stream__(self) -> AsyncIterator[ResponseT]: data = sse.json() if is_mapping(data) and data.get("error"): raise APIError( - message="An error ocurred during streaming", + message="An error occurred during streaming", request=self.response.request, body=data["error"], ) diff --git a/src/openai/cli/_api/completions.py b/src/openai/cli/_api/completions.py index ce1036b224..cbdb35bf3a 100644 --- a/src/openai/cli/_api/completions.py +++ b/src/openai/cli/_api/completions.py @@ -57,7 +57,7 @@ def register(subparser: _SubParsersAction[ArgumentParser]) -> None: ) sub.add_argument( "--logprobs", - help="Include the log probabilites on the `logprobs` most likely tokens, as well the chosen tokens. So for example, if `logprobs` is 10, the API will return a list of the 10 most likely tokens. If `logprobs` is 0, only the chosen tokens will have logprobs returned.", + help="Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. So for example, if `logprobs` is 10, the API will return a list of the 10 most likely tokens. If `logprobs` is 0, only the chosen tokens will have logprobs returned.", type=int, ) sub.add_argument( diff --git a/src/openai/resources/beta/assistants/assistants.py b/src/openai/resources/beta/assistants/assistants.py index efa711ecf4..8854c8b867 100644 --- a/src/openai/resources/beta/assistants/assistants.py +++ b/src/openai/resources/beta/assistants/assistants.py @@ -172,7 +172,7 @@ def update( file_ids: A list of [File](https://platform.openai.com/docs/api-reference/files) IDs attached to this assistant. There can be a maximum of 20 files attached to the assistant. Files are ordered by their creation date in ascending order. If a - file was previosuly attached to the list but does not show up in the list, it + file was previously attached to the list but does not show up in the list, it will be deleted from the assistant. instructions: The system instructions that the assistant uses. The maximum length is 32768 @@ -465,7 +465,7 @@ async def update( file_ids: A list of [File](https://platform.openai.com/docs/api-reference/files) IDs attached to this assistant. There can be a maximum of 20 files attached to the assistant. Files are ordered by their creation date in ascending order. If a - file was previosuly attached to the list but does not show up in the list, it + file was previously attached to the list but does not show up in the list, it will be deleted from the assistant. instructions: The system instructions that the assistant uses. The maximum length is 32768 diff --git a/src/openai/types/beta/assistant_update_params.py b/src/openai/types/beta/assistant_update_params.py index a0efd96ecd..dfb5d4c553 100644 --- a/src/openai/types/beta/assistant_update_params.py +++ b/src/openai/types/beta/assistant_update_params.py @@ -25,7 +25,7 @@ class AssistantUpdateParams(TypedDict, total=False): A list of [File](https://platform.openai.com/docs/api-reference/files) IDs attached to this assistant. There can be a maximum of 20 files attached to the assistant. Files are ordered by their creation date in ascending order. If a - file was previosuly attached to the list but does not show up in the list, it + file was previously attached to the list but does not show up in the list, it will be deleted from the assistant. """ diff --git a/src/openai/types/moderation.py b/src/openai/types/moderation.py index 3602a46985..09c9a6058b 100644 --- a/src/openai/types/moderation.py +++ b/src/openai/types/moderation.py @@ -25,7 +25,7 @@ class Categories(BaseModel): Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is - harrassment. + harassment. """ hate_threatening: bool = FieldInfo(alias="hate/threatening")