Skip to content

Commit

Permalink
assistant delegation working
Browse files Browse the repository at this point in the history
  • Loading branch information
ashpreetbedi committed Jan 9, 2024
1 parent 41f2cb1 commit 953e25b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion phi/assistant/assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_delegation_function(self, task: Task) -> Function:
"""

def delegation_function(task_description: str):
return self.run(task_description, stream=False)
return self.run(message=task_description, stream=False)

_f = Function.from_callable(delegation_function)
_f.name = f_name
Expand Down
4 changes: 2 additions & 2 deletions phi/tools/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def execute(self) -> bool:
except Exception as e:
logger.warning(f"Could not run function {self.get_call_str()}")
logger.error(e)
self.result = e
self.result = str(e)
return False

try:
Expand All @@ -98,5 +98,5 @@ def execute(self) -> bool:
except Exception as e:
logger.warning(f"Could not run function {self.get_call_str()}")
logger.error(e)
self.result = e
self.result = str(e)
return False

0 comments on commit 953e25b

Please sign in to comment.