diff options
Diffstat (limited to '')
-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) |