LanguageModelResult

class LanguageModelResult(val text: String, val toolCalls: List<ContentPart.ToolCall> = emptyList(), val finishReason: FinishReason, val usage: Usage, val providerMetadata: ProviderMetadata = ProviderMetadata.None, val content: List<ContentPart> = buildList { if (text.isNotEmpty()) add(ContentPart.Text(text)) addAll(toolCalls) }, val rawFinishReason: String? = null, val warnings: List<CallWarning> = emptyList(), val request: LanguageModelRequestMetadata = LanguageModelRequestMetadata(), val response: LanguageModelResponseMetadata = LanguageModelResponseMetadata())(source)

One-shot generate result.

Since

0.3.0-beta01

Constructors

Link copied to clipboard
constructor(text: String, toolCalls: List<ContentPart.ToolCall> = emptyList(), finishReason: FinishReason, usage: Usage, providerMetadata: ProviderMetadata = ProviderMetadata.None, content: List<ContentPart> = buildList { if (text.isNotEmpty()) add(ContentPart.Text(text)) addAll(toolCalls) }, rawFinishReason: String? = null, warnings: List<CallWarning> = emptyList(), request: LanguageModelRequestMetadata = LanguageModelRequestMetadata(), response: LanguageModelResponseMetadata = LanguageModelResponseMetadata())

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard