ToolCallingResult constructor

ToolCallingResult({
  1. String? text,
  2. Iterable<ToolCall>? toolCalls,
  3. Iterable<ToolResult>? toolResults,
  4. bool? isComplete,
  5. String? conversationId,
  6. int? iterationsUsed,
  7. String? errorMessage,
  8. int? errorCode,
  9. String? rawText,
  10. String? thinkingContent,
})

Implementation

factory ToolCallingResult({
  $core.String? text,
  $core.Iterable<ToolCall>? toolCalls,
  $core.Iterable<ToolResult>? toolResults,
  $core.bool? isComplete,
  $core.String? conversationId,
  $core.int? iterationsUsed,
  $core.String? errorMessage,
  $core.int? errorCode,
  $core.String? rawText,
  $core.String? thinkingContent,
}) {
  final result = create();
  if (text != null) result.text = text;
  if (toolCalls != null) result.toolCalls.addAll(toolCalls);
  if (toolResults != null) result.toolResults.addAll(toolResults);
  if (isComplete != null) result.isComplete = isComplete;
  if (conversationId != null) result.conversationId = conversationId;
  if (iterationsUsed != null) result.iterationsUsed = iterationsUsed;
  if (errorMessage != null) result.errorMessage = errorMessage;
  if (errorCode != null) result.errorCode = errorCode;
  if (rawText != null) result.rawText = rawText;
  if (thinkingContent != null) result.thinkingContent = thinkingContent;
  return result;
}