GenerationOptions
Tune generation behavior with GenerationOptions.
- Leave a field as
nilto fall back to the defaults packaged with the model bundle. functionCallParsercontrols how tool-call tokens are parsed.LFMFunctionCallParser(the default) handles Liquid Foundation Model Pythonic function calling. SupplyHermesFunctionCallParser()for Hermes/Qwen3 formats, or set the parser tonilto receive raw tool-call text inMessageResponse.chunk.jsonSchemaConstraintactivates constrained generation. UsesetResponseFormat(type:)to populate it from a type annotated with the@Generatablemacro.
LiquidInferenceEngineRunner exposes advanced utilities such as getPromptTokensSize(messages:addBosToken:) for applications that need to budget tokens ahead of time. These methods are backend-specific and may be elevated to the ModelRunner protocol in a future release.
Function Calling Types
StringType, NumberType, etc.) let you attach descriptions and enumerations so that JSON schemas accurately describe your tools. See the Function Calling guide for in-depth usage patterns.