copyWith method

  1. @override
FakeChatModelOptions copyWith({
  1. String? model,
  2. Map<String, dynamic>? metadata,
  3. List<ToolSpec>? tools,
  4. ChatToolChoice? toolChoice,
  5. int? concurrencyLimit,
})
override

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

Implementation

@override
FakeChatModelOptions copyWith({
  final String? model,
  final Map<String, dynamic>? metadata,
  final List<ToolSpec>? tools,
  final ChatToolChoice? toolChoice,
  final int? concurrencyLimit,
}) {
  return FakeChatModelOptions(
    model: model ?? this.model,
    metadata: metadata ?? this.metadata,
    tools: tools ?? this.tools,
    toolChoice: toolChoice ?? this.toolChoice,
    concurrencyLimit: concurrencyLimit ?? this.concurrencyLimit,
  );
}