copyWith method

CactusCompletionParams copyWith({
  1. List<ChatMessage>? messages,
  2. int? maxPredictedTokens,
  3. int? threads,
  4. int? seed,
  5. double? temperature,
  6. int? topK,
  7. double? topP,
  8. double? minP,
  9. double? typicalP,
  10. int? penaltyLastN,
  11. double? penaltyRepeat,
  12. double? penaltyFreq,
  13. double? penaltyPresent,
  14. int? mirostat,
  15. double? mirostatTau,
  16. double? mirostatEta,
  17. bool? ignoreEos,
  18. int? nProbs,
  19. List<String>? stopSequences,
  20. String? grammar,
  21. String? chatTemplate,
  22. CactusTokenCallback? onNewToken,
  23. ResponseFormat? responseFormat,
  24. 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,
  );
}