ToolCallingOptions constructor

ToolCallingOptions({
  1. Iterable<ToolDefinition>? tools,
  2. bool? autoExecute,
  3. String? systemPrompt,
  4. bool? replaceSystemPrompt,
  5. bool? keepToolsAvailable,
  6. ToolCallFormatName? format,
  7. int? maxToolCalls,
  8. ToolChoiceMode? toolChoice,
  9. String? forcedToolName,
  10. bool? parallelToolCalls,
  11. bool? requireJsonArguments,
  12. bool? disableThinking,
  13. double? topP,
  14. bool? validateCalls,
})

Implementation

factory ToolCallingOptions({
  $core.Iterable<ToolDefinition>? tools,
  $core.bool? autoExecute,
  $core.String? systemPrompt,
  $core.bool? replaceSystemPrompt,
  $core.bool? keepToolsAvailable,
  ToolCallFormatName? format,
  $core.int? maxToolCalls,
  ToolChoiceMode? toolChoice,
  $core.String? forcedToolName,
  $core.bool? parallelToolCalls,
  $core.bool? requireJsonArguments,
  $core.bool? disableThinking,
  $core.double? topP,
  $core.bool? validateCalls,
}) {
  final result = create();
  if (tools != null) result.tools.addAll(tools);
  if (autoExecute != null) result.autoExecute = autoExecute;
  if (systemPrompt != null) result.systemPrompt = systemPrompt;
  if (replaceSystemPrompt != null)
    result.replaceSystemPrompt = replaceSystemPrompt;
  if (keepToolsAvailable != null)
    result.keepToolsAvailable = keepToolsAvailable;
  if (format != null) result.format = format;
  if (maxToolCalls != null) result.maxToolCalls = maxToolCalls;
  if (toolChoice != null) result.toolChoice = toolChoice;
  if (forcedToolName != null) result.forcedToolName = forcedToolName;
  if (parallelToolCalls != null) result.parallelToolCalls = parallelToolCalls;
  if (requireJsonArguments != null)
    result.requireJsonArguments = requireJsonArguments;
  if (disableThinking != null) result.disableThinking = disableThinking;
  if (topP != null) result.topP = topP;
  if (validateCalls != null) result.validateCalls = validateCalls;
  return result;
}