options is the second positional parameter: generate(String prompt, [LLMGenerationOptions? options]).
LLMGenerationOptions
LLMGenerationOptions is a protoc-gen-dart message. It has no const constructor, so
build it with the generated named-parameter constructor or with cascade setters:
seed, minP, frequencyPenalty, presencePenalty,
repeatLastN, nThreads, grammar, jsonSchema, disableThinking, thinkingPattern,
structuredOutput, and toolCalling.
LLMGenerationResult
Optional proto fields default to the zero value rather than
null, so use the generated
hasX() guards when the distinction matters.
Thinking Models
Some models emit “thinking” tokens for chain-of-thought reasoning. Declare support when you register the model:LLMGenerationOptions.disableThinking = true to suppress the reasoning phase for a
single call.
See Also
chat()
Simple one-liner
generateStream()
Stream tokens in real-time