diff options
author | razrab <razrab@PimoLin> | 2023-10-22 11:45:18 +0200 |
---|---|---|
committer | razrab <razrab@PimoLin> | 2023-10-22 11:45:18 +0200 |
commit | ecad7a4ac8e0493efbb09be26e73b0d747d49e0f (patch) | |
tree | f359bc9eed97b048e9923d47d5059b71ba1931b5 /g4f_api/ApiInterface.py | |
parent | ~ | Merge pull request #1112 from lategege/main (diff) | |
download | gpt4free-ecad7a4ac8e0493efbb09be26e73b0d747d49e0f.tar gpt4free-ecad7a4ac8e0493efbb09be26e73b0d747d49e0f.tar.gz gpt4free-ecad7a4ac8e0493efbb09be26e73b0d747d49e0f.tar.bz2 gpt4free-ecad7a4ac8e0493efbb09be26e73b0d747d49e0f.tar.lz gpt4free-ecad7a4ac8e0493efbb09be26e73b0d747d49e0f.tar.xz gpt4free-ecad7a4ac8e0493efbb09be26e73b0d747d49e0f.tar.zst gpt4free-ecad7a4ac8e0493efbb09be26e73b0d747d49e0f.zip |
Diffstat (limited to 'g4f_api/ApiInterface.py')
-rw-r--r-- | g4f_api/ApiInterface.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/g4f_api/ApiInterface.py b/g4f_api/ApiInterface.py new file mode 100644 index 00000000..f6572912 --- /dev/null +++ b/g4f_api/ApiInterface.py @@ -0,0 +1,12 @@ +import g4f +from g4f.api import Api + +create_chat_completion_original = g4f.ChatCompletion.create +list_ignored_providers=[] + +def create_chat_completion(*args, **kwargs): + kwargs['ignored']=list_ignored_providers + return create_chat_completion_original(*args, **kwargs) + +g4f.ChatCompletion.create=create_chat_completion +api=Api(g4f, debug=False) |