copyWith method

ConfigCompletion copyWith({
  1. String? model,
  2. int? maxTokens,
  3. double? temperature,
  4. int? topP,
  5. int? n,
  6. bool? stream,
  7. int? logprobs,
  8. String? stop,
})

Generate a new ConfigCompletion object from the original object

Implementation

ConfigCompletion copyWith({
  String? model,
  int? maxTokens,
  double? temperature,
  int? topP,
  int? n,
  bool? stream,
  int? logprobs,
  String? stop,
}) {
  return ConfigCompletion(
    model: model ?? this.model,
    maxTokens: maxTokens ?? this.maxTokens,
    temperature: temperature ?? this.temperature,
    topP: topP ?? this.topP,
    n: n ?? this.n,
    stream: stream ?? this.stream,
    logprobs: logprobs ?? this.logprobs,
    stop: stop ?? this.stop,
  );
}