Spaces:
Runtime error
Runtime error
copilot-swe-agent[bot] svar-chandak commited on
Commit ·
f87e227
1
Parent(s): ba2defa
Fix inconsistent error handling in coordinator methods
Browse filesCo-authored-by: svar-chandak <165100618+svar-chandak@users.noreply.github.com>
src/agents/__pycache__/coordinator.cpython-312.pyc
ADDED
|
Binary file (8.37 kB). View file
|
|
|
src/agents/coordinator.py
CHANGED
|
@@ -99,7 +99,8 @@ class AITools:
|
|
| 99 |
|
| 100 |
except Exception as e:
|
| 101 |
error_msg = f"Impossible to generate SQL query: {e}"
|
| 102 |
-
|
|
|
|
| 103 |
|
| 104 |
def ETL(self, dataframe: List[Any]) -> str:
|
| 105 |
"""
|
|
@@ -128,7 +129,8 @@ class AITools:
|
|
| 128 |
|
| 129 |
except Exception as e:
|
| 130 |
error_msg = f"Impossible to generate ETL pipeline: {e}"
|
| 131 |
-
|
|
|
|
| 132 |
|
| 133 |
def agent_analysis(self, files: List[Any], question: str) -> str:
|
| 134 |
"""
|
|
@@ -157,7 +159,8 @@ class AITools:
|
|
| 157 |
|
| 158 |
except Exception as e:
|
| 159 |
error_msg = f"Impossible to generate analysis: {e}"
|
| 160 |
-
|
|
|
|
| 161 |
|
| 162 |
def web(self, question: str) -> str:
|
| 163 |
"""
|
|
@@ -186,7 +189,8 @@ class AITools:
|
|
| 186 |
|
| 187 |
except Exception as e:
|
| 188 |
error_msg = f"Impossible to return output: {e}"
|
| 189 |
-
|
|
|
|
| 190 |
|
| 191 |
def clear_history(self) -> None:
|
| 192 |
"""
|
|
|
|
| 99 |
|
| 100 |
except Exception as e:
|
| 101 |
error_msg = f"Impossible to generate SQL query: {e}"
|
| 102 |
+
self.sql_etl += error_msg + "\n"
|
| 103 |
+
return self.sql_etl
|
| 104 |
|
| 105 |
def ETL(self, dataframe: List[Any]) -> str:
|
| 106 |
"""
|
|
|
|
| 129 |
|
| 130 |
except Exception as e:
|
| 131 |
error_msg = f"Impossible to generate ETL pipeline: {e}"
|
| 132 |
+
self.sql_etl += error_msg + "\n"
|
| 133 |
+
return self.sql_etl
|
| 134 |
|
| 135 |
def agent_analysis(self, files: List[Any], question: str) -> str:
|
| 136 |
"""
|
|
|
|
| 159 |
|
| 160 |
except Exception as e:
|
| 161 |
error_msg = f"Impossible to generate analysis: {e}"
|
| 162 |
+
self.analysis += error_msg + "\n"
|
| 163 |
+
return self.analysis
|
| 164 |
|
| 165 |
def web(self, question: str) -> str:
|
| 166 |
"""
|
|
|
|
| 189 |
|
| 190 |
except Exception as e:
|
| 191 |
error_msg = f"Impossible to return output: {e}"
|
| 192 |
+
self.analysis += error_msg + "\n"
|
| 193 |
+
return self.analysis
|
| 194 |
|
| 195 |
def clear_history(self) -> None:
|
| 196 |
"""
|