copyWith method

Assistant copyWith({
  1. String? id,
  2. String? object,
  3. int? createdAt,
  4. String? model,
  5. Object? name = unsetCopyWithValue,
  6. Object? description = unsetCopyWithValue,
  7. Object? instructions = unsetCopyWithValue,
  8. List<AssistantTool>? tools,
  9. Object? toolResources = unsetCopyWithValue,
  10. Map<String, String>? metadata,
  11. Object? temperature = unsetCopyWithValue,
  12. Object? topP = unsetCopyWithValue,
  13. 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?,
  );
}