copyWith method
CactusCompletionParams
copyWith({
- List<
ChatMessage> ? messages, - int? maxPredictedTokens,
- int? threads,
- int? seed,
- double? temperature,
- int? topK,
- double? topP,
- double? minP,
- double? typicalP,
- int? penaltyLastN,
- double? penaltyRepeat,
- double? penaltyFreq,
- double? penaltyPresent,
- int? mirostat,
- double? mirostatTau,
- double? mirostatEta,
- bool? ignoreEos,
- int? nProbs,
- List<
String> ? stopSequences, - String? grammar,
- String? chatTemplate,
- CactusTokenCallback? onNewToken,
- ResponseFormat? responseFormat,
- bool? jinja,
Implementation
CactusCompletionParams copyWith({
List<ChatMessage>? messages,
int? maxPredictedTokens,
int? threads,
int? seed,
double? temperature,
int? topK,
double? topP,
double? minP,
double? typicalP,
int? penaltyLastN,
double? penaltyRepeat,
double? penaltyFreq,
double? penaltyPresent,
int? mirostat,
double? mirostatTau,
double? mirostatEta,
bool? ignoreEos,
int? nProbs,
List<String>? stopSequences,
String? grammar,
String? chatTemplate,
CactusTokenCallback? onNewToken,
ResponseFormat? responseFormat,
bool? jinja,
}) {
return CactusCompletionParams(
messages: messages ?? this.messages,
maxPredictedTokens: maxPredictedTokens ?? this.maxPredictedTokens,
threads: threads ?? this.threads,
seed: seed ?? this.seed,
temperature: temperature ?? this.temperature,
topK: topK ?? this.topK,
topP: topP ?? this.topP,
minP: minP ?? this.minP,
typicalP: typicalP ?? this.typicalP,
penaltyLastN: penaltyLastN ?? this.penaltyLastN,
penaltyRepeat: penaltyRepeat ?? this.penaltyRepeat,
penaltyFreq: penaltyFreq ?? this.penaltyFreq,
penaltyPresent: penaltyPresent ?? this.penaltyPresent,
mirostat: mirostat ?? this.mirostat,
mirostatTau: mirostatTau ?? this.mirostatTau,
mirostatEta: mirostatEta ?? this.mirostatEta,
ignoreEos: ignoreEos ?? this.ignoreEos,
nProbs: nProbs ?? this.nProbs,
stopSequences: stopSequences ?? this.stopSequences,
grammar: grammar ?? this.grammar,
chatTemplate: chatTemplate ?? this.chatTemplate,
onNewToken: onNewToken ?? this.onNewToken,
responseFormat: responseFormat ?? this.responseFormat,
jinja: jinja ?? this.jinja,
);
}