StopSequence class sealed

Stop sequences for completions.

Can be a single string or a list of up to 4 strings where the model will stop generating further tokens.

Example

// Single stop sequence
final stop = StopSequence.single('\n');

// Multiple stop sequences
final stop = StopSequence.multiple(['\n', 'END', '###']);
Implementers

Constructors

StopSequence.fromJson(Object json)
Creates from JSON.
factory
StopSequence.multiple(List<String> stops)
Creates multiple stop sequences.
const
factory
StopSequence.single(String stop)
Creates a single stop sequence.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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