Closed Uranium2 closed 1 year ago
Thats a very good suggestion, and yes its very much possible. I'll have a look into it soon.
Version 0.1.5
is now out! You can view the changelog file here. As for updating the library, run the following command:
pip install UnlimitedGPT -U
View the docs here.
This version implements your suggestion :) Let me know if it works for you, I've tested it on my end and it works well. Closing the issue within the next 24 hours. Thanks for your suggestion btw!
I was so close of making it! Never used selenium before, it's quite powerful!
It works perfectly thank you!
Glad to hear that! If you like the project, I'd appreciate it if you star the repository :) Closing the issue now!
I got an error in the case when I didn't had a long response:
message = api.send_message(prompt_for_llm.to_string())
File "E:\DEV\Open_Fit\.venv_win\lib\site-packages\UnlimitedGPT\UnlimitedGPT.py", line 418, in send_message
continuation = self._continue_generating(timeout = timeout)
File "E:\DEV\Open_Fit\.venv_win\lib\site-packages\UnlimitedGPT\UnlimitedGPT.py", line 302, in _continue_generating
raise TimeoutException('Could not click continue regenerating button')
selenium.common.exceptions.TimeoutException: Message: Could not click continue regenerating button
I am sure that there were no continue regenerating button, the generation was over. Not sure what is the best way to handle this. A try execpt pass? That seems ugly and not very pythonic
Ah yeah, I actually copied the code of regenerating the response and modified it to support the continue regeneration response, and the code included the error raising parts. For now just use try except, I'll fix it though and update the library soon. Shouldn't take long. Sorry for the inconvenience!
The patch update is now pushed to pypi, update the package and it should fix the issue
I've been using your module to ask ChatGPT stuff, and sometimes ChatGPT will respond with a lot of text, and stops and will ask to continue generating or to regenerate.
In your case,
api.send_message
will return the truncated answer of ChatGPT, is it possible to detect when this button is here and press it? Maybe to mate it a default argument tosend_message
as True.Maybe I'll try to make a PR to implement this.