diff --git a/FRONTEND/lib/api/endpoints/agent_endpoint.dart b/FRONTEND/lib/api/endpoints/agent_endpoint.dart index 024e169..bf62574 100644 --- a/FRONTEND/lib/api/endpoints/agent_endpoint.dart +++ b/FRONTEND/lib/api/endpoints/agent_endpoint.dart @@ -243,11 +243,11 @@ class AgentDto { final String modelName; final ModelProviderType providerType; final String? modelEndpoint; - final double temperature; - final int maxTokens; - final String systemPrompt; - final bool enableMemory; - final int conversationWindowSize; + final double? temperature; + final int? maxTokens; + final String? systemPrompt; + final bool? enableMemory; + final int? conversationWindowSize; final AgentStatus status; final DateTime createdAt; final DateTime updatedAt; @@ -261,11 +261,11 @@ class AgentDto { required this.modelName, required this.providerType, this.modelEndpoint, - required this.temperature, - required this.maxTokens, - required this.systemPrompt, - required this.enableMemory, - required this.conversationWindowSize, + this.temperature, + this.maxTokens, + this.systemPrompt, + this.enableMemory, + this.conversationWindowSize, required this.status, required this.createdAt, required this.updatedAt, @@ -300,11 +300,11 @@ class AgentDto { modelName: json['modelName'] as String, providerType: parseProviderType(json['providerType']), modelEndpoint: json['modelEndpoint'] as String?, - temperature: (json['temperature'] as num).toDouble(), - maxTokens: json['maxTokens'] as int, - systemPrompt: json['systemPrompt'] as String, - enableMemory: json['enableMemory'] as bool, - conversationWindowSize: json['conversationWindowSize'] as int, + temperature: json['temperature'] != null ? (json['temperature'] as num).toDouble() : null, + maxTokens: json['maxTokens'] as int?, + systemPrompt: json['systemPrompt'] as String?, + enableMemory: json['enableMemory'] as bool?, + conversationWindowSize: json['conversationWindowSize'] as int?, status: parseAgentStatus(json['status']), createdAt: DateTime.parse(json['createdAt'] as String), updatedAt: DateTime.parse(json['updatedAt'] as String),