-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add example script for ToolService with Launcher #18
Conversation
agentfile/orchestrators/agent.py
Outdated
) | ||
else: | ||
messages = memory.get() | ||
response = await self.llm.apredict_and_call( | ||
tools_plus_human, | ||
chat_history=messages, | ||
error_on_no_tool_call=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should keep this line 👀 But just need the latest version of core (I updated the toml in main)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah i was confused why that was there, but my core wasn't updated on my local machine! Will make the change 👍🏼
agentfile/launchers/local.py
Outdated
# shutdown | ||
for task in bg_tasks: | ||
task.cancel() | ||
mq_task.cancel() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if there's a way to return the final result here too -- maybe a future improvement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I modified this to what I think is a bit more graceful shutdown.
agentfile/launchers/local.py
Outdated
@@ -31,10 +32,12 @@ def __init__( | |||
services: List[BaseService], | |||
control_plane: BaseControlPlane, | |||
message_queue: SimpleMessageQueue, | |||
additional_consumers: List[BaseMessageQueueConsumer] = [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we should avoid having lists as default params, due to pass-by-reference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch! I removed this entirely anyways though.
* wip * put back error_on_no_tool_call=False * cleaner shutdown and UX * move registration of tool imn acall * add deregister method
No description provided.