Closed GravityPhone closed 6 months ago
fe0523753b
)[!TIP] I can email you next time I complete a pull request if you set up your email here!
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
assistant_manager.py
✓ https://github.com/GravityPhone/hatz/commit/c61a57471fd8fb6e372f3c11b0daa4fd1ece49cd Edit
Modify assistant_manager.py with contents:
• Remove the import statement for the 'Assistant' class from the 'openai' package.
• Remove the 'EventHandler' class, as it subclasses the 'Assistant' class and will no longer be necessary.
• Modify the 'run_assistant' method of the 'AssistantManager' class to not use the 'EventHandler' class. This may involve removing the 'event_handler' argument from the 'create_and_stream' method call and handling events in a different way, depending on the requirements of the 'openai' package.
--- +++ @@ -1,5 +1,4 @@ import openai -from openai import Assistant from typing_extensions import override import time @@ -57,7 +56,6 @@ thread_id=thread_id, assistant_id=assistant_id, instructions=instructions, - event_handler=EventHandler(), ) as stream: stream.until_done()
assistant_manager.py
✓ Edit
Check assistant_manager.py with contents:
Ran GitHub Actions for c61a57471fd8fb6e372f3c11b0daa4fd1ece49cd:
I have finished reviewing the code for completeness. I did not find errors for sweep/address_error_ef238
.
💡 To recreate the pull request edit the issue title or description. Something wrong? Let us know.
This is an automated message generated by Sweep AI.
I attempted to run main_controller.py and I got this error: python .\main_controller.py Traceback (most recent call last): File "C:\smarthat\main_controller.py", line 6, in
from assistant_manager import AssistantManager
File "C:\smarthat\assistant_manager.py", line 2, in
from openai import Assistant
ImportError: cannot import name 'Assistant' from 'openai' (C:\Users\gravi.pyenv\pyenv-win\versions\3.9.0\lib\site-packages\openai__init__.py)
Please address this directly, and consider what was supposed to happen if we didn't see this error.
You don't make huge changes just fix my error so I can give you the next error if there is one.
Checklist
- [X] Modify `assistant_manager.py` ✓ https://github.com/GravityPhone/hatz/commit/c61a57471fd8fb6e372f3c11b0daa4fd1ece49cd [Edit](https://github.com/GravityPhone/hatz/edit/sweep/address_error_ef238/assistant_manager.py) - [X] Running GitHub Actions for `assistant_manager.py` ✓ [Edit](https://github.com/GravityPhone/hatz/edit/sweep/address_error_ef238/assistant_manager.py)