feat: unified capabilities (Graph + Parallel + Conversation + Agent + KnowledgeStore)
Browse files- purpose_agent/actor.py +4 -2
purpose_agent/actor.py
CHANGED
|
@@ -244,9 +244,11 @@ class Actor:
|
|
| 244 |
result = self._parse_action_text(raw)
|
| 245 |
|
| 246 |
action_data = result.get("action", {})
|
|
|
|
|
|
|
| 247 |
return Action(
|
| 248 |
-
name=action_data.get("name", "UNKNOWN"),
|
| 249 |
-
params=action_data.get("params", {}),
|
| 250 |
thought=result.get("thought", ""),
|
| 251 |
expected_delta=result.get("expected_delta", ""),
|
| 252 |
)
|
|
|
|
| 244 |
result = self._parse_action_text(raw)
|
| 245 |
|
| 246 |
action_data = result.get("action", {})
|
| 247 |
+
if isinstance(action_data, str):
|
| 248 |
+
action_data = {"name": action_data, "params": {}}
|
| 249 |
return Action(
|
| 250 |
+
name=action_data.get("name", "UNKNOWN") if isinstance(action_data, dict) else str(action_data),
|
| 251 |
+
params=action_data.get("params", {}) if isinstance(action_data, dict) else {},
|
| 252 |
thought=result.get("thought", ""),
|
| 253 |
expected_delta=result.get("expected_delta", ""),
|
| 254 |
)
|