Skip to content

The g4f api cannot specify a provider! How to solve this? #2333

Answered by Linden10
Perfecttoor asked this question in Q&A
Discussion options

You must be logged in to vote

After looking into the code, I found out how to control which provider the api uses!

You're going to have to manually open models.py located somewhere in your g4f folder, usually located in the following locations:

System-Wide:
C:\Python[Version]\Lib\site-packages\g4f\models.py

Current User:
C:\Users[user]\AppData\Local\Programs\Python\Python[Version]\Lib\site-packages\g4f\models.py

Open it in notepad or whatever default text editor you use and then scroll towards "Text" section near the top, there you'll see
various models with a "best_provider" list, look at the list of providers and remove anything you don't want to use for the given
ChatGPT Model you're using.

For example, if I wanted…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Perfecttoor
Comment options

Answer selected by Perfecttoor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants