Assistant

@Serializable
data class Assistant(val id: AssistantId, val createdAt: Long, val name: String? = null, val description: String? = null, val model: ModelId, val instructions: String? = null, val tools: List<AssistantTool>, val toolResources: ToolResources? = null, val metadata: Map<String, String>, val temperature: Double? = null, val topP: Double? = null, val responseFormat: AssistantResponseFormat? = null)

Constructors

Link copied to clipboard
constructor(id: AssistantId, createdAt: Long, name: String? = null, description: String? = null, model: ModelId, instructions: String? = null, tools: List<AssistantTool>, toolResources: ToolResources? = null, metadata: Map<String, String>, temperature: Double? = null, topP: Double? = null, responseFormat: AssistantResponseFormat? = null)

Properties

Link copied to clipboard
@SerialName(value = "created_at")
val createdAt: Long

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

Link copied to clipboard
@SerialName(value = "description")
val description: String? = null

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

Link copied to clipboard
@SerialName(value = "id")
val id: AssistantId

The identifier, which can be referenced in API endpoints.

Link copied to clipboard
@SerialName(value = "instructions")
val instructions: String? = null

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

Link copied to clipboard
@SerialName(value = "metadata")
val metadata: Map<String, String>

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 maximum of 512 characters long.

Link copied to clipboard
@SerialName(value = "model")
val model: ModelId

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.

Link copied to clipboard
@SerialName(value = "name")
val name: String? = null

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

Link copied to clipboard
@SerialName(value = "response_format")
val responseFormat: AssistantResponseFormat? = null

Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 Turbo, and all GPT-3.5 Turbo models since gpt-3.5-turbo-1106.

Link copied to clipboard
@SerialName(value = "temperature")
val temperature: Double? = null

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

Link copied to clipboard
@SerialName(value = "tool_resources")
val toolResources: ToolResources? = null

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.

Link copied to clipboard
@SerialName(value = "tools")
val tools: List<AssistantTool>

A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types CodeInterpreter, FileSearch, or FunctionTool

Link copied to clipboard
@SerialName(value = "top_p")
val topP: Double? = null

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.