Skip to content

assistant

Classes:

Name Description
Assistant

Assistant

Attributes:

Name Type Description
created_at int

The Unix timestamp (in seconds) for when the assistant was created.

description Optional[str]

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

file_ids List[str]

A list of file IDs

id str

The identifier, which can be referenced in API endpoints.

instructions Optional[str]

The system instructions that the assistant uses.

metadata Optional[object]

Set of 16 key-value pairs that can be attached to an object.

model str

ID of the model to use.

name Optional[str]

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

object Literal['assistant']

The object type, which is always assistant.

tools List[AssistantTool]

A list of tool enabled on the assistant.

created_at instance-attribute

created_at: int

The Unix timestamp (in seconds) for when the assistant was created.

description class-attribute instance-attribute

description: Optional[str] = None

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

file_ids instance-attribute

file_ids: List[str]

A list of file 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.

id instance-attribute

id: str

The identifier, which can be referenced in API endpoints.

instructions class-attribute instance-attribute

instructions: Optional[str] = None

The system instructions that the assistant uses.

The maximum length is 32768 characters.

metadata class-attribute instance-attribute

metadata: Optional[object] = None

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.

model instance-attribute

model: str

ID of the model to use.

You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.

name class-attribute instance-attribute

name: Optional[str] = None

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

object instance-attribute

object: Literal['assistant']

The object type, which is always assistant.

tools instance-attribute

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.