You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ubuntu 20.04 and lots of other Linux distros are shipped with Python 3.8 preinstalled and they come with apt repos that only have Python 3.8 and not the newest version of python. Uninstalling Python 3.8 ruins the entire operating system, so people are forced to side install the newest version and make it work. Updating python for gpt4free and then dealing with bugs that appear is a nightmare, for me and for other people I met who use this. Moreover, lots of people use their own VPS to store gpt4free. Usually, a VPS comes with Ubuntu 20.04 with Python 3.8 preinstalled. It's very frustrating to make the sideloaded newer version of python work with g4f, as it results in many errors that you should deal with overnight.
I'm not a professional developer yet, but Python 3.8 should have everything for gpt4free to function properly, some changes need to be done to the code though.
For example, you can literally make Bing provider work on Python 3.8 and not throw an error by making a small change to the code in Bing.py, lines 412-419:
Would throw an error Exception has occurred: TypeError: unsupported operand type(s) for |: 'dict' and 'dict'" before though
Correct me if I'm wrong, but I think it might be beneficial to create a version of gpt4free (maybe with a bit limited functionality) that can operate on Python 3.8. This will make lives of dozens and (probably) hundreds of people much easier.
The text was updated successfully, but these errors were encountered:
Ubuntu 20.04 and lots of other Linux distros are shipped with Python 3.8 preinstalled and they come with apt repos that only have Python 3.8 and not the newest version of python. Uninstalling Python 3.8 ruins the entire operating system, so people are forced to side install the newest version and make it work. Updating python for gpt4free and then dealing with bugs that appear is a nightmare, for me and for other people I met who use this. Moreover, lots of people use their own VPS to store gpt4free. Usually, a VPS comes with Ubuntu 20.04 with Python 3.8 preinstalled. It's very frustrating to make the sideloaded newer version of python work with g4f, as it results in many errors that you should deal with overnight.
I'm not a professional developer yet, but Python 3.8 should have everything for gpt4free to function properly, some changes need to be done to the code though.
For example, you can literally make Bing provider work on Python 3.8 and not throw an error by making a small change to the code in Bing.py, lines 412-419:
Change the | operator to this:
And now it works perfectly fine with Python 3.8
Would throw an error
Exception has occurred: TypeError: unsupported operand type(s) for |: 'dict' and 'dict'"
before thoughCorrect me if I'm wrong, but I think it might be beneficial to create a version of gpt4free (maybe with a bit limited functionality) that can operate on Python 3.8. This will make lives of dozens and (probably) hundreds of people much easier.
The text was updated successfully, but these errors were encountered: