Header menu logo Nao

CompletionResult Type

The result of an LLM completion

Record fields

Record Field Description

Content

Full Usage: Content

Field type: string

The generated text content

Field type: string

FinishReason

Full Usage: FinishReason

Field type: string

Why generation stopped (e.g. "stop", "length", "tool_call")

Field type: string

TokensUsed

Full Usage: TokensUsed

Field type: int option

Number of tokens consumed (prompt + completion), if reported by the provider

Field type: int option

Type something to start searching.