class

OpenAI::AssistantObject

Inherits JSON::Serializable < Reference < Object

Represents an assistant that can call the model and use tools.

Constructors

new(id : String = "", object : AssistantObjectObject = AssistantObjectObject::Assistant, created_at : Int64 = 0, name : AssistantObjectName = nil, description : AssistantObjectDescription = nil, model : String = "", instructions : AssistantObjectInstructions = nil, tools : Array(AssistantTool) = [] of AssistantTool, tool_resources : AssistantObjectToolResources | Nil = nil, metadata : Metadata = nil, temperature : AssistantObjectTemperature | Nil = nil, top_p : AssistantObjectTopP | Nil = nil, response_format : AssistantObjectResponseFormat | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

created_at

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

Source
created_at=(created_at : Int64)

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

Source
description
Source
description=(description : AssistantObjectDescription)
Source
id

The identifier, which can be referenced in API endpoints.

Source
id=(id : String)

The identifier, which can be referenced in API endpoints.

Source
instructions
Source
instructions=(instructions : AssistantObjectInstructions)
Source
metadata
Source
metadata=(metadata : Metadata)
Source
model

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.

Source
model=(model : String)

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.

Source
name
Source
name=(name : AssistantObjectName)
Source
object

The object type, which is always assistant.

Source
object=(object : AssistantObjectObject)

The object type, which is always assistant.

Source
response_format
Source
response_format=(response_format : AssistantObjectResponseFormat | Nil)
Source
temperature
Source
temperature=(temperature : AssistantObjectTemperature | Nil)
Source
tool_resources
Source
tool_resources=(tool_resources : AssistantObjectToolResources | Nil)
Source
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, file_search, or function.

Source
tools=(tools : Array(AssistantTool))

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, file_search, or function.

Source
top_p
Source
top_p=(top_p : AssistantObjectTopP | Nil)
Source
validate!
Source