GenerationEvent constructor
GenerationEvent({
- GenerationEventKind? kind,
- String? sessionId,
- String? prompt,
- String? token,
- String? streamingText,
- int? tokensCount,
- String? response,
- int? tokensUsed,
- Int64? latencyMs,
- Int64? firstTokenLatencyMs,
- String? error,
- String? modelId,
- double? costAmount,
- double? costSavedAmount,
- String? routingTarget,
- String? routingReason,
- String? cancelReason,
- String? toolCallId,
- String? toolName,
- String? toolPayloadJson,
- String? structuredSchemaJson,
- String? structuredOutputJson,
- String? thinkingText,
- int? inputTokens,
- double? tokensPerSecond,
- Int64? timeToFirstTokenMs,
- bool? isStreaming,
- double? temperature,
- int? maxTokens,
- int? contextLength,
- String? modelName,
- double? durationMs,
- 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;
}