AssistantRequest

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

Constructors

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

Properties

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

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

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

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

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

Set of 16 key-value pairs that can be attached to an object. Optional. 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? = null

ID of the model to use. This is required if the assistant does not yet exist.

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

The name of the assistant. Optional. 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 set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the code_interpreter tool requires a list of file IDs, while the file_search tool requires a list of vector store IDs.

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

A list of tools enabled on the assistant. Optional. Defaults to an empty list. Tools can be of types code_interpreter, retrieval, or function.

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.