ModifyAssistantRequest class

Request object for the Modify assistant endpoint.

Annotations
  • @freezed

Constructors

ModifyAssistantRequest({@JsonKey(includeIfNull: false) String? model, @JsonKey(includeIfNull: false) String? name, @JsonKey(includeIfNull: false) String? description, @JsonKey(includeIfNull: false) String? instructions, @Default([]) List<AssistantTools> tools, @JsonKey(name: 'file_ids') @Default([]) List<String> fileIds, @JsonKey(name: 'tool_resources', includeIfNull: false) ToolResources? toolResources, @JsonKey(includeIfNull: false) Map<String, dynamic>? metadata, @JsonKey(includeIfNull: false) @Default(1.0) double? temperature, @JsonKey(name: 'top_p', includeIfNull: false) @Default(1.0) double? topP, @_ModifyAssistantRequestResponseFormatConverter() @JsonKey(name: 'response_format', includeIfNull: false) ModifyAssistantRequestResponseFormat? responseFormat})
Factory constructor for ModifyAssistantRequest
const
factory
ModifyAssistantRequest.fromJson(Map<String, dynamic> json)
Object construction from a JSON representation
factory

Properties

copyWith → $ModifyAssistantRequestCopyWith<ModifyAssistantRequest>
Create a copy of ModifyAssistantRequest with the given fields replaced by the non-null parameter values.
no setterinherited
description String?
The description of the assistant. The maximum length is 512 characters.
no setterinherited
fileIds List<String>
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. If a file was previosuly attached to the list but does not show up in the list, it will be deleted from the assistant.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
instructions String?
The system instructions that the assistant uses. The maximum length is 256,000 characters.
no setterinherited
metadata Map<String, dynamic>?
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.
no setterinherited
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.
no setterinherited
name String?
The name of the assistant. The maximum length is 256 characters.
no setterinherited
responseFormat ModifyAssistantRequestResponseFormat?
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.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
temperature double?
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.
no setterinherited
toolResources ToolResources?
A set of resources that are made available to the assistant's tools in this thread. 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.
no setterinherited
tools List<AssistantTools>
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.
no setterinherited
topP double?
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.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this ModifyAssistantRequest to a JSON map.
inherited
toMap() Map<String, dynamic>
Map representation of object (not serialized)
toString() String
A string representation of this object.
inherited
validateSchema() String?
Perform validations on the schema property values

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

descriptionMaxLengthValue → const int
instructionsMaxLengthValue → const int
nameMaxLengthValue → const int
Validation constants
propertyNames → const List<String>
List of all property names of schema
temperatureDefaultValue → const double
temperatureMaxValue → const double
temperatureMinValue → const double
topPDefaultValue → const double
topPMaxValue → const double
topPMinValue → const double