Skip to content
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

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

Merged
merged 2 commits into from
May 18, 2024

Conversation

bonk1t
Copy link
Contributor

@bonk1t bonk1t commented May 16, 2024

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:

  • Moved the _check_parameters method call before updating the agent's attributes.
  • Ensured that the assistant updates correctly when parameters differ.

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
Copy link
Owner

VRSEN commented May 18, 2024

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

@VRSEN VRSEN merged commit bc04e44 into VRSEN:main May 18, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in Agent.init_oai Method Prevents Assistants from Updating Correctly
2 participants