LLMGenerationResult constructor

LLMGenerationResult({
  1. String? text,
  2. String? thinkingContent,
  3. int? inputTokens,
  4. int? tokensGenerated,
  5. String? modelUsed,
  6. double? generationTimeMs,
  7. double? ttftMs,
  8. double? tokensPerSecond,
  9. String? framework,
  10. String? finishReason,
  11. int? thinkingTokens,
  12. int? responseTokens,
  13. String? jsonOutput,
  14. PerformanceMetrics? performance,
  15. ExecutionTarget? executedOn,
  16. StructuredOutputValidation? structuredOutputValidation,
  17. int? totalTokens,
  18. String? errorMessage,
  19. int? errorCode,
  20. int? cachedPromptTokens,
  21. Int64? promptEvalTimeMs,
  22. Int64? decodeTimeMs,
  23. Iterable<ToolCall>? toolCalls,
  24. Iterable<ToolResult>? toolResults,
})

Implementation

factory LLMGenerationResult({
  $core.String? text,
  $core.String? thinkingContent,
  $core.int? inputTokens,
  $core.int? tokensGenerated,
  $core.String? modelUsed,
  $core.double? generationTimeMs,
  $core.double? ttftMs,
  $core.double? tokensPerSecond,
  $core.String? framework,
  $core.String? finishReason,
  $core.int? thinkingTokens,
  $core.int? responseTokens,
  $core.String? jsonOutput,
  PerformanceMetrics? performance,
  ExecutionTarget? executedOn,
  $1.StructuredOutputValidation? structuredOutputValidation,
  $core.int? totalTokens,
  $core.String? errorMessage,
  $core.int? errorCode,
  $core.int? cachedPromptTokens,
  $fixnum.Int64? promptEvalTimeMs,
  $fixnum.Int64? decodeTimeMs,
  $core.Iterable<$2.ToolCall>? toolCalls,
  $core.Iterable<$2.ToolResult>? toolResults,
}) {
  final result = create();
  if (text != null) result.text = text;
  if (thinkingContent != null) result.thinkingContent = thinkingContent;
  if (inputTokens != null) result.inputTokens = inputTokens;
  if (tokensGenerated != null) result.tokensGenerated = tokensGenerated;
  if (modelUsed != null) result.modelUsed = modelUsed;
  if (generationTimeMs != null) result.generationTimeMs = generationTimeMs;
  if (ttftMs != null) result.ttftMs = ttftMs;
  if (tokensPerSecond != null) result.tokensPerSecond = tokensPerSecond;
  if (framework != null) result.framework = framework;
  if (finishReason != null) result.finishReason = finishReason;
  if (thinkingTokens != null) result.thinkingTokens = thinkingTokens;
  if (responseTokens != null) result.responseTokens = responseTokens;
  if (jsonOutput != null) result.jsonOutput = jsonOutput;
  if (performance != null) result.performance = performance;
  if (executedOn != null) result.executedOn = executedOn;
  if (structuredOutputValidation != null)
    result.structuredOutputValidation = structuredOutputValidation;
  if (totalTokens != null) result.totalTokens = totalTokens;
  if (errorMessage != null) result.errorMessage = errorMessage;
  if (errorCode != null) result.errorCode = errorCode;
  if (cachedPromptTokens != null)
    result.cachedPromptTokens = cachedPromptTokens;
  if (promptEvalTimeMs != null) result.promptEvalTimeMs = promptEvalTimeMs;
  if (decodeTimeMs != null) result.decodeTimeMs = decodeTimeMs;
  if (toolCalls != null) result.toolCalls.addAll(toolCalls);
  if (toolResults != null) result.toolResults.addAll(toolResults);
  return result;
}