-
Notifications
You must be signed in to change notification settings - Fork 536
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
Adding/removing a tool should also update the system prompt accordingly #149
Comments
The try:
model_message = self.model(
self.input_messages,
tools_to_call_from=list(self.tools.values()),
stop_sequences=["Observation:"],
) For example: agent = ToolCallingAgent(tools=[get_weather], model=model)
print(agent.system_prompt) # Lists 'get_weather', 'final_answer'
agent.tools["get_news"] = get_news
del agent.tools["get_weather"]
print(agent.system_prompt) # No change yet
agent.run("what is the weather in Paris? Also inform me about the news there.")
print(agent.system_prompt) # Now lists 'final_answer', 'get_news' |
You're right @AngeloKiriakoulis ! The logic is handled in initialize_system_prompt() which runs at the beginning of each This is because system prompt is more agent logic than toolbox-logic, so changing system prompt on the toolbox level would probably have created some broken expectations/lower readability for the user. (it was already the case in transformers.agents @andrewrreed ) |
I think the current state has good functionality for low complexity (especially given the distinction between |
This makes sense to me, thanks for the clarification both! |
Currently, if the user updates
agent.tools
, say to add or delete a given tool, that update is not reflected in theagent.system_prompt
.I recall there used to be dedicated functionality for managing a
toolbox
, but with the port tosmolagents
I think this got lostThe text was updated successfully, but these errors were encountered: