Commit ·
d15c90b
1
Parent(s): b028e94
made the models in one place
Browse files- src/agents/agents.py +8 -8
src/agents/agents.py
CHANGED
|
@@ -1923,14 +1923,14 @@ class auto_analyst(dspy.Module):
|
|
| 1923 |
logger.log_message(f"Module return: {module_return}", level=logging.INFO)
|
| 1924 |
|
| 1925 |
# Add None check before accessing dictionary keys
|
| 1926 |
-
|
| 1927 |
-
|
| 1928 |
-
|
| 1929 |
-
|
| 1930 |
-
|
| 1931 |
-
|
| 1932 |
-
|
| 1933 |
-
|
| 1934 |
|
| 1935 |
# Handle different plan formats
|
| 1936 |
plan = module_return['plan']
|
|
|
|
| 1923 |
logger.log_message(f"Module return: {module_return}", level=logging.INFO)
|
| 1924 |
|
| 1925 |
# Add None check before accessing dictionary keys
|
| 1926 |
+
if module_return is None:
|
| 1927 |
+
logger.log_message("Planner returned None, returning error response", level=logging.ERROR)
|
| 1928 |
+
return {
|
| 1929 |
+
"plan": "There was an error" + str(dict_) +'\n' ,
|
| 1930 |
+
"plan_instructions": {},
|
| 1931 |
+
"complexity": "unknown",
|
| 1932 |
+
"error": "Planner failed to generate a plan"
|
| 1933 |
+
}
|
| 1934 |
|
| 1935 |
# Handle different plan formats
|
| 1936 |
plan = module_return['plan']
|