This pull request adjusts the assistant manager to utilize the new streaming capabilities of the OpenAI API. The changes include the removal of the check_run_status method and the modification of the run_assistant method to use the new create_and_stream method from the OpenAI API.
Summary
Imported AssistantEventHandler and override from openai and typing_extensions respectively.
Removed the check_run_status method as it is no longer needed with the new streaming capabilities.
Modified the run_assistant method to use the create_and_stream method from the OpenAI API. This method creates a new run and streams the events to an event handler until the run is done.
Added an EventHandler instance as an argument to the create_and_stream method call in the run_assistant method.
Changed the return value of the run_assistant method to a boolean value. It now returns True if the run is successful and False if an exception occurs.
Changes were made in the assistant_manager.py file.
Fixes #4.
π Latest improvements to Sweep:
New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
PR Feedback (click)
Description
This pull request adjusts the assistant manager to utilize the new streaming capabilities of the OpenAI API. The changes include the removal of the
check_run_status
method and the modification of therun_assistant
method to use the newcreate_and_stream
method from the OpenAI API.Summary
AssistantEventHandler
andoverride
fromopenai
andtyping_extensions
respectively.check_run_status
method as it is no longer needed with the new streaming capabilities.run_assistant
method to use thecreate_and_stream
method from the OpenAI API. This method creates a new run and streams the events to an event handler until the run is done.EventHandler
instance as an argument to thecreate_and_stream
method call in therun_assistant
method.run_assistant
method to a boolean value. It now returnsTrue
if the run is successful andFalse
if an exception occurs.assistant_manager.py
file.Fixes #4.
π Latest improvements to Sweep:
π‘ To get Sweep to edit this pull request, you can: