This commit addresses issue #12, which aimed to improve the automation of ChatGPT by accurately detecting when a ChatGPT response is completed.
Previously, it was challenging to determine when the ChatGPT response was completed due to the streaming nature of the text to the browser. This led to inefficient techniques like time.sleep being used to retrieve the output.
In this commit, we have implemented a reliable method to detect when a ChatGPT response is completed. We achieved this by checking for changes in the div class of the response element (from "result-streaming" to "markdown") and using invisibility_of_element_located to wait for the streaming response element to become invisible.
This change allows us to obtain the output accurately and efficiently, improving the overall performance of the ChatGPT automation script.
This commit addresses issue #12, which aimed to improve the automation of ChatGPT by accurately detecting when a ChatGPT response is completed.
Previously, it was challenging to determine when the ChatGPT response was completed due to the streaming nature of the text to the browser. This led to inefficient techniques like
time.sleep
being used to retrieve the output.In this commit, we have implemented a reliable method to detect when a ChatGPT response is completed. We achieved this by checking for changes in the
div
class of the response element (from "result-streaming" to "markdown") and usinginvisibility_of_element_located
to wait for the streaming response element to become invisible.This change allows us to obtain the output accurately and efficiently, improving the overall performance of the ChatGPT automation script.