From 17837e6486d2afef6bf77c404a1f8535d89bdc57 Mon Sep 17 00:00:00 2001 From: dal Date: Fri, 9 May 2025 14:24:16 -0600 Subject: [PATCH] hotfix if no syntax, generic --- .../agents/src/tools/categories/file_tools/create_metrics.rs | 4 ++-- .../agents/src/tools/categories/file_tools/modify_metrics.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/libs/agents/src/tools/categories/file_tools/create_metrics.rs b/api/libs/agents/src/tools/categories/file_tools/create_metrics.rs index 0b938c0e9..228e3e40b 100644 --- a/api/libs/agents/src/tools/categories/file_tools/create_metrics.rs +++ b/api/libs/agents/src/tools/categories/file_tools/create_metrics.rs @@ -101,8 +101,8 @@ impl ToolExecutor for CreateMetricFilesTool { let data_source_syntax = match self.agent.get_state_value("data_source_syntax").await { Some(Value::String(syntax_str)) => syntax_str, - Some(_) => bail!("Data source syntax is not a string"), - None => bail!("Data source syntax not found in agent state"), + Some(_) => "generic".to_string(), + None => "generic".to_string(), }; // Collect results from processing each file concurrently diff --git a/api/libs/agents/src/tools/categories/file_tools/modify_metrics.rs b/api/libs/agents/src/tools/categories/file_tools/modify_metrics.rs index e636b3845..4213dc368 100644 --- a/api/libs/agents/src/tools/categories/file_tools/modify_metrics.rs +++ b/api/libs/agents/src/tools/categories/file_tools/modify_metrics.rs @@ -271,8 +271,8 @@ impl ToolExecutor for ModifyMetricFilesTool { let data_source_dialect = match self.agent.get_state_value("data_source_syntax").await { Some(Value::String(dialect_str)) => dialect_str, - Some(_) => bail!("Data source dialect is not a string"), - None => bail!("Data source dialect not found in agent state"), + Some(_) => "generic".to_string(), + None => "generic".to_string(), }; // Map to store validated dataset IDs for each successfully updated metric