GptAssistant class

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

Annotations
  • @JsonSerializable(includeIfNull: false)

Constructors

GptAssistant({required String id, String object = "assistant", required int createdAt, String? name, String? description, required String model, String? instructions, required List<AssistantTool> tools, required List<String> fileIds, required Map<String, dynamic> metadata})
GptAssistant.fromJson(Map<String, dynamic> json)
factory

Properties

createdAt int
The Unix timestamp (in seconds) for when the assistant was created.
getter/setter pair
description String?
The description of the assistant. The maximum length is 512 characters.
getter/setter pair
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.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String
The identifier, which can be referenced in API endpoints.
getter/setter pair
instructions String?
The system instructions that the assistant uses. The maximum length is 32768 characters.
getter/setter pair
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 maxium of 512 characters long.
getter/setter pair
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.
getter/setter pair
name String?
The name of the assistant. The maximum length is 256 characters.
getter/setter pair
object String
The object type, which is always assistant.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
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 code_interpreter, retrieval, or function.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

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