copyWith method

  1. @override
ChatFirebaseVertexAIOptions copyWith({
  1. String? model,
  2. double? topP,
  3. int? topK,
  4. int? candidateCount,
  5. int? maxOutputTokens,
  6. double? temperature,
  7. List<String>? stopSequences,
  8. String? responseMimeType,
  9. List<ChatFirebaseVertexAISafetySetting>? safetySettings,
  10. FirebaseAIBackend? backend,
  11. List<ToolSpec>? tools,
  12. ChatToolChoice? toolChoice,
  13. int? concurrencyLimit,
})

Creates a copy of this RunnableOptions with the given fields replaced by the new values.

Implementation

@override
ChatFirebaseVertexAIOptions copyWith({
  final String? model,
  final double? topP,
  final int? topK,
  final int? candidateCount,
  final int? maxOutputTokens,
  final double? temperature,
  final List<String>? stopSequences,
  final String? responseMimeType,
  final List<ChatFirebaseVertexAISafetySetting>? safetySettings,
  final FirebaseAIBackend? backend,
  final List<ToolSpec>? tools,
  final ChatToolChoice? toolChoice,
  final int? concurrencyLimit,
}) {
  return ChatFirebaseVertexAIOptions(
    model: model ?? this.model,
    topP: topP ?? this.topP,
    topK: topK ?? this.topK,
    candidateCount: candidateCount ?? this.candidateCount,
    maxOutputTokens: maxOutputTokens ?? this.maxOutputTokens,
    temperature: temperature ?? this.temperature,
    stopSequences: stopSequences ?? this.stopSequences,
    responseMimeType: responseMimeType ?? this.responseMimeType,
    safetySettings: safetySettings ?? this.safetySettings,
    backend: backend ?? this.backend,
    tools: tools ?? this.tools,
    toolChoice: toolChoice ?? this.toolChoice,
    concurrencyLimit: concurrencyLimit ?? this.concurrencyLimit,
  );
}