copyWith method
Assistant
copyWith({
- String? id,
- String? object,
- int? createdAt,
- String? model,
- Object? name = unsetCopyWithValue,
- Object? description = unsetCopyWithValue,
- Object? instructions = unsetCopyWithValue,
- List<
AssistantTool> ? tools, - Object? toolResources = unsetCopyWithValue,
- Map<
String, String> ? metadata, - Object? temperature = unsetCopyWithValue,
- Object? topP = unsetCopyWithValue,
- Object? responseFormat = unsetCopyWithValue,
Creates a copy with the given fields replaced.
Implementation
Assistant copyWith({
String? id,
String? object,
int? createdAt,
String? model,
Object? name = unsetCopyWithValue,
Object? description = unsetCopyWithValue,
Object? instructions = unsetCopyWithValue,
List<AssistantTool>? tools,
Object? toolResources = unsetCopyWithValue,
Map<String, String>? metadata,
Object? temperature = unsetCopyWithValue,
Object? topP = unsetCopyWithValue,
Object? responseFormat = unsetCopyWithValue,
}) {
return Assistant(
id: id ?? this.id,
object: object ?? this.object,
createdAt: createdAt ?? this.createdAt,
model: model ?? this.model,
name: name == unsetCopyWithValue ? this.name : name as String?,
description: description == unsetCopyWithValue
? this.description
: description as String?,
instructions: instructions == unsetCopyWithValue
? this.instructions
: instructions as String?,
tools: tools ?? this.tools,
toolResources: toolResources == unsetCopyWithValue
? this.toolResources
: toolResources as ToolResources?,
metadata: metadata ?? this.metadata,
temperature: temperature == unsetCopyWithValue
? this.temperature
: temperature as double?,
topP: topP == unsetCopyWithValue ? this.topP : topP as double?,
responseFormat: responseFormat == unsetCopyWithValue
? this.responseFormat
: responseFormat as ResponseFormat?,
);
}