Rohan03 commited on
Commit
2d933e9
·
verified ·
1 Parent(s): 525ba6d

feat: unified capabilities (Graph + Parallel + Conversation + Agent + KnowledgeStore)

Browse files
Files changed (1) hide show
  1. 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
  )