CompletionStop class sealed

Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.

Implementers
Annotations
  • @freezed

Constructors

CompletionStop.fromJson(Map<String, dynamic> json)
Object construction from a JSON representation
factory
CompletionStop.listString(List<String> value)
A list of string stop sequences.
const
factory
CompletionStop.string(String? value)
A string 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
value Object?
no setterinherited

Methods

map<TResult extends Object?>({required TResult listString(CompletionStopListString value), required TResult string(CompletionStopString value)}) → TResult
inherited
mapOrNull<TResult extends Object?>({TResult? listString(CompletionStopListString value)?, TResult? string(CompletionStopString value)?}) → TResult?
inherited
maybeMap<TResult extends Object?>({TResult listString(CompletionStopListString value)?, TResult string(CompletionStopString value)?, required TResult orElse()}) → TResult
inherited
maybeWhen<TResult extends Object?>({TResult listString(List<String> value)?, TResult string(String? value)?, required TResult orElse()}) → TResult
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this CompletionStop to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>({required TResult listString(List<String> value), required TResult string(String? value)}) → TResult
inherited
whenOrNull<TResult extends Object?>({TResult? listString(List<String> value)?, TResult? string(String? value)?}) → TResult?
inherited

Operators

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