AssistantToolsPatterns extension
Adds pattern-matching-related methods to AssistantTools.
Methods
-
map<
TResult extends Object?> ({required TResult codeInterpreter(AssistantToolsCodeInterpreter value), required TResult fileSearch(AssistantToolsFileSearch value), required TResult function(AssistantToolsFunction value)}) → TResult -
Available on AssistantTools, provided by the AssistantToolsPatterns extension
Aswitch
-like method, using callbacks. -
mapOrNull<
TResult extends Object?> ({TResult? codeInterpreter(AssistantToolsCodeInterpreter value)?, TResult? fileSearch(AssistantToolsFileSearch value)?, TResult? function(AssistantToolsFunction value)?}) → TResult? -
Available on AssistantTools, provided by the AssistantToolsPatterns extension
A variant ofmap
that fallback to returningnull
. -
maybeMap<
TResult extends Object?> ({TResult codeInterpreter(AssistantToolsCodeInterpreter value)?, TResult fileSearch(AssistantToolsFileSearch value)?, TResult function(AssistantToolsFunction value)?, required TResult orElse()}) → TResult -
Available on AssistantTools, provided by the AssistantToolsPatterns extension
A variant ofmap
that fallback to returningorElse
. -
maybeWhen<
TResult extends Object?> ({TResult codeInterpreter(String type)?, TResult fileSearch(String type, AssistantToolsFileSearchFileSearch? fileSearch)?, TResult function(String type, FunctionObject function)?, required TResult orElse()}) → TResult -
Available on AssistantTools, provided by the AssistantToolsPatterns extension
A variant ofwhen
that fallback to anorElse
callback. -
when<
TResult extends Object?> ({required TResult codeInterpreter(String type), required TResult fileSearch(String type, AssistantToolsFileSearchFileSearch? fileSearch), required TResult function(String type, FunctionObject function)}) → TResult -
Available on AssistantTools, provided by the AssistantToolsPatterns extension
Aswitch
-like method, using callbacks. -
whenOrNull<
TResult extends Object?> ({TResult? codeInterpreter(String type)?, TResult? fileSearch(String type, AssistantToolsFileSearchFileSearch? fileSearch)?, TResult? function(String type, FunctionObject function)?}) → TResult? -
Available on AssistantTools, provided by the AssistantToolsPatterns extension
A variant ofwhen
that fallback to returningnull