AssistantTools class sealed

A tool that can be used by an assistant.

Implementers
Annotations
  • @Freezed(unionKey: 'type', unionValueCase: FreezedUnionCase.snake)

Constructors

AssistantTools.codeInterpreter({@Default('code_interpreter') String type})
Code interpreter tool
const
factory
AssistantTools.fileSearch({required String type, @JsonKey(name: 'file_search', includeIfNull: false) AssistantToolsFileSearchFileSearch? fileSearch})
FileSearch tool
const
factory
AssistantTools.fromJson(Map<String, dynamic> json)
Object construction from a JSON representation
factory
AssistantTools.function({@Default('function') String type, required FunctionObject function})
Function tool
const
factory

Properties

copyWith → $AssistantToolsCopyWith<AssistantTools>
Create a copy of AssistantTools with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
The type of tool being defined: code_interpreter
no setterinherited

Methods

map<TResult extends Object?>({required TResult codeInterpreter(AssistantToolsCodeInterpreter value), required TResult fileSearch(AssistantToolsFileSearch value), required TResult function(AssistantToolsFunction value)}) → TResult
inherited
mapOrNull<TResult extends Object?>({TResult? codeInterpreter(AssistantToolsCodeInterpreter value)?, TResult? fileSearch(AssistantToolsFileSearch value)?, TResult? function(AssistantToolsFunction value)?}) → TResult?
inherited
maybeMap<TResult extends Object?>({TResult codeInterpreter(AssistantToolsCodeInterpreter value)?, TResult fileSearch(AssistantToolsFileSearch value)?, TResult function(AssistantToolsFunction value)?, required TResult orElse()}) → TResult
inherited
maybeWhen<TResult extends Object?>({TResult codeInterpreter(String type)?, TResult fileSearch(String type, AssistantToolsFileSearchFileSearch? fileSearch)?, TResult function(String type, FunctionObject function)?, required TResult orElse()}) → TResult
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this AssistantTools to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>({required TResult codeInterpreter(String type), required TResult fileSearch(String type, AssistantToolsFileSearchFileSearch? fileSearch), required TResult function(String type, FunctionObject function)}) → TResult
inherited
whenOrNull<TResult extends Object?>({TResult? codeInterpreter(String type)?, TResult? fileSearch(String type, AssistantToolsFileSearchFileSearch? fileSearch)?, TResult? function(String type, FunctionObject function)?}) → TResult?
inherited

Operators

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