GenerationEvent constructor

GenerationEvent({
  1. GenerationEventKind? kind,
  2. String? sessionId,
  3. String? prompt,
  4. String? token,
  5. String? streamingText,
  6. int? tokensCount,
  7. String? response,
  8. int? tokensUsed,
  9. Int64? latencyMs,
  10. Int64? firstTokenLatencyMs,
  11. String? error,
  12. String? modelId,
  13. double? costAmount,
  14. double? costSavedAmount,
  15. String? routingTarget,
  16. String? routingReason,
  17. String? cancelReason,
  18. String? toolCallId,
  19. String? toolName,
  20. String? toolPayloadJson,
  21. String? structuredSchemaJson,
  22. String? structuredOutputJson,
  23. String? thinkingText,
  24. int? inputTokens,
  25. double? tokensPerSecond,
  26. Int64? timeToFirstTokenMs,
  27. bool? isStreaming,
  28. double? temperature,
  29. int? maxTokens,
  30. int? contextLength,
  31. String? modelName,
  32. double? durationMs,
  33. int? framework,
})

Implementation

factory GenerationEvent({
  GenerationEventKind? kind,
  $core.String? sessionId,
  $core.String? prompt,
  $core.String? token,
  $core.String? streamingText,
  $core.int? tokensCount,
  $core.String? response,
  $core.int? tokensUsed,
  $fixnum.Int64? latencyMs,
  $fixnum.Int64? firstTokenLatencyMs,
  $core.String? error,
  $core.String? modelId,
  $core.double? costAmount,
  $core.double? costSavedAmount,
  $core.String? routingTarget,
  $core.String? routingReason,
  $core.String? cancelReason,
  $core.String? toolCallId,
  $core.String? toolName,
  $core.String? toolPayloadJson,
  $core.String? structuredSchemaJson,
  $core.String? structuredOutputJson,
  $core.String? thinkingText,
  $core.int? inputTokens,
  $core.double? tokensPerSecond,
  $fixnum.Int64? timeToFirstTokenMs,
  $core.bool? isStreaming,
  $core.double? temperature,
  $core.int? maxTokens,
  $core.int? contextLength,
  $core.String? modelName,
  $core.double? durationMs,
  $core.int? framework,
}) {
  final result = create();
  if (kind != null) result.kind = kind;
  if (sessionId != null) result.sessionId = sessionId;
  if (prompt != null) result.prompt = prompt;
  if (token != null) result.token = token;
  if (streamingText != null) result.streamingText = streamingText;
  if (tokensCount != null) result.tokensCount = tokensCount;
  if (response != null) result.response = response;
  if (tokensUsed != null) result.tokensUsed = tokensUsed;
  if (latencyMs != null) result.latencyMs = latencyMs;
  if (firstTokenLatencyMs != null)
    result.firstTokenLatencyMs = firstTokenLatencyMs;
  if (error != null) result.error = error;
  if (modelId != null) result.modelId = modelId;
  if (costAmount != null) result.costAmount = costAmount;
  if (costSavedAmount != null) result.costSavedAmount = costSavedAmount;
  if (routingTarget != null) result.routingTarget = routingTarget;
  if (routingReason != null) result.routingReason = routingReason;
  if (cancelReason != null) result.cancelReason = cancelReason;
  if (toolCallId != null) result.toolCallId = toolCallId;
  if (toolName != null) result.toolName = toolName;
  if (toolPayloadJson != null) result.toolPayloadJson = toolPayloadJson;
  if (structuredSchemaJson != null)
    result.structuredSchemaJson = structuredSchemaJson;
  if (structuredOutputJson != null)
    result.structuredOutputJson = structuredOutputJson;
  if (thinkingText != null) result.thinkingText = thinkingText;
  if (inputTokens != null) result.inputTokens = inputTokens;
  if (tokensPerSecond != null) result.tokensPerSecond = tokensPerSecond;
  if (timeToFirstTokenMs != null)
    result.timeToFirstTokenMs = timeToFirstTokenMs;
  if (isStreaming != null) result.isStreaming = isStreaming;
  if (temperature != null) result.temperature = temperature;
  if (maxTokens != null) result.maxTokens = maxTokens;
  if (contextLength != null) result.contextLength = contextLength;
  if (modelName != null) result.modelName = modelName;
  if (durationMs != null) result.durationMs = durationMs;
  if (framework != null) result.framework = framework;
  return result;
}