Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs(api): improve docstrings
  • Loading branch information
RobertCraigie committed Nov 6, 2023
commit 39356bf599e335dda319357fd1b014bafa46d13d
72 changes: 36 additions & 36 deletions src/openai/resources/beta/assistants/assistants.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def create(
timeout: float | None | NotGiven = NOT_GIVEN,
) -> Assistant:
"""
Create an Assistant with a model and instructions.
Create an assistant with a model and instructions.

Args:
model: ID of the model to use. You can use the
Expand All @@ -62,23 +62,23 @@ def create(
[Model overview](https://platform.openai.com/docs/models/overview) for
descriptions of them.

description: The description of the Assistant. The maximum length is 512 characters.
description: The description of the assistant. The maximum length is 512 characters.

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.
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.

instructions: The system instructions that the Assistant uses. The maximum length is 32768
instructions: The system instructions that the assistant uses. The maximum length is 32768
characters.

metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
for storing additional information about the object in a structured format. Keys
can be a maximum of 64 characters long and values can be a maxium of 512
characters long.

name: The name of the Assistant. The maximum length is 256 characters.
name: The name of the assistant. The maximum length is 256 characters.

tools: A list of tool enabled on the Assistant. There can be a maximum of 128 tools per
tools: A list of tool enabled on the assistant. There can be a maximum of 128 tools per
assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.

extra_headers: Send extra headers
Expand Down Expand Up @@ -122,7 +122,7 @@ def retrieve(
timeout: float | None | NotGiven = NOT_GIVEN,
) -> Assistant:
"""
Retrieves an Assistant.
Retrieves an assistant.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -160,20 +160,20 @@ def update(
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
) -> Assistant:
"""Modifies an Assistant.
"""Modifies an assistant.

Args:
description: The description of the Assistant.
description: The description of the assistant.

The maximum length is 512 characters.

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
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
will be deleted from the assistant.

instructions: The system instructions that the Assistant uses. The maximum length is 32768
instructions: The system instructions that the assistant uses. The maximum length is 32768
characters.

metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
Expand All @@ -187,9 +187,9 @@ def update(
[Model overview](https://platform.openai.com/docs/models/overview) for
descriptions of them.

name: The name of the Assistant. The maximum length is 256 characters.
name: The name of the assistant. The maximum length is 256 characters.

tools: A list of tool enabled on the Assistant. There can be a maximum of 128 tools per
tools: A list of tool enabled on the assistant. There can be a maximum of 128 tools per
assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.

extra_headers: Send extra headers
Expand Down Expand Up @@ -235,7 +235,7 @@ def list(
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
) -> SyncCursorPage[Assistant]:
"""Returns a list of Assistants.
"""Returns a list of assistants.

Args:
after: A cursor for use in pagination.
Expand Down Expand Up @@ -298,7 +298,7 @@ def delete(
timeout: float | None | NotGiven = NOT_GIVEN,
) -> AsssitantDeleted:
"""
Delete an Assistant.
Delete an assistant.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -346,7 +346,7 @@ async def create(
timeout: float | None | NotGiven = NOT_GIVEN,
) -> Assistant:
"""
Create an Assistant with a model and instructions.
Create an assistant with a model and instructions.

Args:
model: ID of the model to use. You can use the
Expand All @@ -355,23 +355,23 @@ async def create(
[Model overview](https://platform.openai.com/docs/models/overview) for
descriptions of them.

description: The description of the Assistant. The maximum length is 512 characters.
description: The description of the assistant. The maximum length is 512 characters.

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.
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.

instructions: The system instructions that the Assistant uses. The maximum length is 32768
instructions: The system instructions that the assistant uses. The maximum length is 32768
characters.

metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
for storing additional information about the object in a structured format. Keys
can be a maximum of 64 characters long and values can be a maxium of 512
characters long.

name: The name of the Assistant. The maximum length is 256 characters.
name: The name of the assistant. The maximum length is 256 characters.

tools: A list of tool enabled on the Assistant. There can be a maximum of 128 tools per
tools: A list of tool enabled on the assistant. There can be a maximum of 128 tools per
assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.

extra_headers: Send extra headers
Expand Down Expand Up @@ -415,7 +415,7 @@ async def retrieve(
timeout: float | None | NotGiven = NOT_GIVEN,
) -> Assistant:
"""
Retrieves an Assistant.
Retrieves an assistant.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -453,20 +453,20 @@ async def update(
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
) -> Assistant:
"""Modifies an Assistant.
"""Modifies an assistant.

Args:
description: The description of the Assistant.
description: The description of the assistant.

The maximum length is 512 characters.

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
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
will be deleted from the assistant.

instructions: The system instructions that the Assistant uses. The maximum length is 32768
instructions: The system instructions that the assistant uses. The maximum length is 32768
characters.

metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
Expand All @@ -480,9 +480,9 @@ async def update(
[Model overview](https://platform.openai.com/docs/models/overview) for
descriptions of them.

name: The name of the Assistant. The maximum length is 256 characters.
name: The name of the assistant. The maximum length is 256 characters.

tools: A list of tool enabled on the Assistant. There can be a maximum of 128 tools per
tools: A list of tool enabled on the assistant. There can be a maximum of 128 tools per
assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.

extra_headers: Send extra headers
Expand Down Expand Up @@ -528,7 +528,7 @@ def list(
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[Assistant, AsyncCursorPage[Assistant]]:
"""Returns a list of Assistants.
"""Returns a list of assistants.

Args:
after: A cursor for use in pagination.
Expand Down Expand Up @@ -591,7 +591,7 @@ async def delete(
timeout: float | None | NotGiven = NOT_GIVEN,
) -> AsssitantDeleted:
"""
Delete an Assistant.
Delete an assistant.

Args:
extra_headers: Send extra headers
Expand Down
20 changes: 10 additions & 10 deletions src/openai/resources/beta/assistants/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ def create(
timeout: float | None | NotGiven = NOT_GIVEN,
) -> AssistantFile:
"""
Create an Assistant File by attaching a
Create an assistant file by attaching a
[File](https://platform.openai.com/docs/api-reference/files) to an
[Assistant](https://platform.openai.com/docs/api-reference/assistants).
[assistant](https://platform.openai.com/docs/api-reference/assistants).

Args:
file_id: A [File](https://platform.openai.com/docs/api-reference/files) ID (with
`purpose="assistants"`) that the Assistant should use. Useful for tools like
`purpose="assistants"`) that the assistant should use. Useful for tools like
`retrieval` and `code_interpreter` that can access files.

extra_headers: Send extra headers
Expand Down Expand Up @@ -120,7 +120,7 @@ def list(
timeout: float | None | NotGiven = NOT_GIVEN,
) -> SyncCursorPage[AssistantFile]:
"""
Returns a list of Assistant Files.
Returns a list of assistant files.

Args:
after: A cursor for use in pagination. `after` is an object ID that defines your place
Expand Down Expand Up @@ -182,7 +182,7 @@ def delete(
timeout: float | None | NotGiven = NOT_GIVEN,
) -> FileDeleteResponse:
"""
Delete an Assistant File.
Delete an assistant file.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -223,13 +223,13 @@ async def create(
timeout: float | None | NotGiven = NOT_GIVEN,
) -> AssistantFile:
"""
Create an Assistant File by attaching a
Create an assistant file by attaching a
[File](https://platform.openai.com/docs/api-reference/files) to an
[Assistant](https://platform.openai.com/docs/api-reference/assistants).
[assistant](https://platform.openai.com/docs/api-reference/assistants).

Args:
file_id: A [File](https://platform.openai.com/docs/api-reference/files) ID (with
`purpose="assistants"`) that the Assistant should use. Useful for tools like
`purpose="assistants"`) that the assistant should use. Useful for tools like
`retrieval` and `code_interpreter` that can access files.

extra_headers: Send extra headers
Expand Down Expand Up @@ -299,7 +299,7 @@ def list(
timeout: float | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[AssistantFile, AsyncCursorPage[AssistantFile]]:
"""
Returns a list of Assistant Files.
Returns a list of assistant files.

Args:
after: A cursor for use in pagination. `after` is an object ID that defines your place
Expand Down Expand Up @@ -361,7 +361,7 @@ async def delete(
timeout: float | None | NotGiven = NOT_GIVEN,
) -> FileDeleteResponse:
"""
Delete an Assistant File.
Delete an assistant file.

Args:
extra_headers: Send extra headers
Expand Down
8 changes: 4 additions & 4 deletions src/openai/resources/beta/threads/messages/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def retrieve(
timeout: float | None | NotGiven = NOT_GIVEN,
) -> MessageFile:
"""
Retrieves a Message File.
Retrieves a message file.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -76,7 +76,7 @@ def list(
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
) -> SyncCursorPage[MessageFile]:
"""Returns a list of Message Files.
"""Returns a list of message files.

Args:
after: A cursor for use in pagination.
Expand Down Expand Up @@ -149,7 +149,7 @@ async def retrieve(
timeout: float | None | NotGiven = NOT_GIVEN,
) -> MessageFile:
"""
Retrieves a Message File.
Retrieves a message file.

Args:
extra_headers: Send extra headers
Expand Down Expand Up @@ -185,7 +185,7 @@ def list(
extra_body: Body | None = None,
timeout: float | None | NotGiven = NOT_GIVEN,
) -> AsyncPaginator[MessageFile, AsyncCursorPage[MessageFile]]:
"""Returns a list of Message Files.
"""Returns a list of message files.

Args:
after: A cursor for use in pagination.
Expand Down
Loading