SessionRequest class final

Everything an engine needs to open a session (InferenceModel.openEngineSession). A later option is a new field, not a new parameter on every engine.

Constructors

SessionRequest({double? temperature, int? randomSeed, int? topK, double? topP, String? loraPath, bool? enableVisionModality, bool? enableAudioModality, String? systemInstruction, bool enableThinking = false, List<Tool> tools = const [], int? maxOutputTokens, ModelType? modelType, ToolChoice toolChoice = ToolChoice.auto, JsonSchemaResponseFormat? responseFormat})

Properties

enableAudioModality → bool?
Null = the model's own default.
final
enableThinking → bool
final
enableVisionModality → bool?
Null = the model's own default.
final
hashCode → int
The hash code for this object.
no setterinherited
loraPath → String?
final
maxOutputTokens → int?
final
modelType → ModelType?
From InferenceModel.openChat; null = the model's own.
final
randomSeed → int?
final
responseFormat → JsonSchemaResponseFormat?
What every reply must be. Non-null only after core accepted the format (InferenceModel.refusalFor returned null). The engine must enforce the schema during generation for every reply from this session. Core validates the completed reply as a guard; that validation is not a substitute for constrained generation, and a non-conforming reply is an engine bug.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
systemInstruction → String?
final
temperature → double?
final
toolChoice → ToolChoice
From InferenceModel.openChat; ToolChoice.auto from InferenceModel.openSession.
final
tools → List<Tool>
Unmodifiable.
final
topK → int?
final
topP → double?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited