copyWith method
AssistantConfig
copyWith({
- Toolkit? toolkit,
- PromptLayout? prompt,
- ModelProfile? profile,
- ReplyStrategy? replies,
- ConfirmationPolicy? confirmation,
- ListReferences? listReferences,
- ScreenRequestMapper? screenRequests,
- List<
OutputGuard> ? guards, - OutputRewriter? rewriter,
- TurnHook? beforeModel,
- ToolGate? beforeTool,
- AssistantStrings? strings,
- GrammarOptions? grammar,
- SamplingOptions? sampling,
- Duration? toolStatusDelay,
- Duration? toolTimeout,
- ToolErrorPolicy? toolErrors,
- DateTime today()?,
- bool? restoreOpenQuestion,
A copy with the given fields replaced (a null argument keeps the current value).
Implementation
AssistantConfig copyWith({
Toolkit? toolkit,
PromptLayout? prompt,
ModelProfile? profile,
ReplyStrategy? replies,
ConfirmationPolicy? confirmation,
ListReferences? listReferences,
ScreenRequestMapper? screenRequests,
List<OutputGuard>? guards,
OutputRewriter? rewriter,
TurnHook? beforeModel,
ToolGate? beforeTool,
AssistantStrings? strings,
GrammarOptions? grammar,
SamplingOptions? sampling,
Duration? toolStatusDelay,
Duration? toolTimeout,
ToolErrorPolicy? toolErrors,
DateTime Function()? today,
bool? restoreOpenQuestion,
}) => AssistantConfig(
toolkit: toolkit ?? this.toolkit,
prompt: prompt ?? this.prompt,
profile: profile ?? this.profile,
replies: replies ?? this.replies,
confirmation: confirmation ?? this.confirmation,
listReferences: listReferences ?? this.listReferences,
screenRequests: screenRequests ?? this.screenRequests,
guards: guards ?? this.guards,
rewriter: rewriter ?? this.rewriter,
beforeModel: beforeModel ?? this.beforeModel,
beforeTool: beforeTool ?? this.beforeTool,
strings: strings ?? this.strings,
grammar: grammar ?? this.grammar,
sampling: sampling ?? this.sampling,
toolStatusDelay: toolStatusDelay ?? this.toolStatusDelay,
toolTimeout: toolTimeout ?? this.toolTimeout,
toolErrors: toolErrors ?? this.toolErrors,
today: today ?? this.today,
restoreOpenQuestion: restoreOpenQuestion ?? this.restoreOpenQuestion,
);