VRSEN / agency-swarm

The only reliable agent framework built on top of the latest OpenAI Assistants API.
https://vrsen.github.io/agency-swarm/
MIT License
2.05k stars 537 forks source link

Fix Order of Operations in `Agent.init_oai` Method to Ensure Assistant Updates #127

Closed bonk1t closed 1 month ago

bonk1t commented 1 month ago

This PR addresses an issue in the Agent.init_oai method where the _check_parameters method was called after updating the agent's attributes. This caused the parameter check to always return True, preventing the assistant from updating when necessary.

Changes Made:

These changes ensure that the assistant's configuration is properly updated when its parameters change, maintaining the correct and up-to-date assistant settings.

close #126

VRSEN commented 1 month ago

Thanks for bringing this up. I adjusted the logic a bit so only undefined parameters are copied from openai. This means that when initializing your assistant from id you can now only specify parameters that you'd like to check for updates. The rest you can simply set to none, and they will be copied from openai