From 36fe869a81ad44480b2aa72bdc3fae2952c69816 Mon Sep 17 00:00:00 2001 From: razrab Date: Mon, 23 Oct 2023 11:01:08 +0300 Subject: Refactor API initialization to accept a list of ignored providers. --- g4f_api/ApiInterface.py | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 g4f_api/ApiInterface.py (limited to 'g4f_api/ApiInterface.py') diff --git a/g4f_api/ApiInterface.py b/g4f_api/ApiInterface.py deleted file mode 100644 index f6572912..00000000 --- a/g4f_api/ApiInterface.py +++ /dev/null @@ -1,12 +0,0 @@ -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) -- cgit v1.2.3