copyWith method

PlaygroundSettings copyWith({
  1. PlaygroundSourceKind? kind,
  2. String? modelDir,
  3. String? provider,
  4. String? baseUrl,
  5. String? model,
  6. String? apiKey,
  7. String? systemPrompt,
  8. int? maxNewTokens,
  9. double? temperature,
  10. int? seed,
  11. bool clearSeed = false,
  12. String? jsonSchema,
  13. List<String>? stop,
})

Implementation

PlaygroundSettings copyWith({
  PlaygroundSourceKind? kind,
  String? modelDir,
  String? provider,
  String? baseUrl,
  String? model,
  String? apiKey,
  String? systemPrompt,
  int? maxNewTokens,
  double? temperature,
  int? seed,
  bool clearSeed = false,
  String? jsonSchema,
  List<String>? stop,
}) => PlaygroundSettings(
  kind: kind ?? this.kind,
  modelDir: modelDir ?? this.modelDir,
  provider: provider ?? this.provider,
  baseUrl: baseUrl ?? this.baseUrl,
  model: model ?? this.model,
  apiKey: apiKey ?? this.apiKey,
  systemPrompt: systemPrompt ?? this.systemPrompt,
  maxNewTokens: maxNewTokens ?? this.maxNewTokens,
  temperature: temperature ?? this.temperature,
  seed: clearSeed ? null : seed ?? this.seed,
  jsonSchema: jsonSchema ?? this.jsonSchema,
  stop: stop ?? this.stop,
);