summaryrefslogtreecommitdiffstats
path: root/g4f/api
diff options
context:
space:
mode:
authorTekky <98614666+xtekky@users.noreply.github.com>2023-11-13 17:37:15 +0100
committerGitHub <noreply@github.com>2023-11-13 17:37:15 +0100
commit746588814c0568b76e88ef1df6b0acc51e9928d9 (patch)
tree5687176c38cee25de77bef62d0951c339410bda8 /g4f/api
parentMerge pull request #1243 from AndPim4912/main (diff)
parentAdded back list_ignored_providers parameter to ChatCompletion.create method in api. (diff)
downloadgpt4free-746588814c0568b76e88ef1df6b0acc51e9928d9.tar
gpt4free-746588814c0568b76e88ef1df6b0acc51e9928d9.tar.gz
gpt4free-746588814c0568b76e88ef1df6b0acc51e9928d9.tar.bz2
gpt4free-746588814c0568b76e88ef1df6b0acc51e9928d9.tar.lz
gpt4free-746588814c0568b76e88ef1df6b0acc51e9928d9.tar.xz
gpt4free-746588814c0568b76e88ef1df6b0acc51e9928d9.tar.zst
gpt4free-746588814c0568b76e88ef1df6b0acc51e9928d9.zip
Diffstat (limited to 'g4f/api')
-rw-r--r--g4f/api/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/g4f/api/__init__.py b/g4f/api/__init__.py
index de05c377..8eceb743 100644
--- a/g4f/api/__init__.py
+++ b/g4f/api/__init__.py
@@ -82,7 +82,11 @@ class Api:
messages = item_data.get('messages')
try:
- response = g4f.ChatCompletion.create(model=model, stream=stream, messages=messages)
+ response = g4f.ChatCompletion.create(
+ model=model,
+ stream=stream,
+ messages=messages,
+ list_ignored_providers=self.list_ignored_providers)
except Exception as e:
logging.exception(e)
return Response(content=json.dumps({"error": "An error occurred while generating the response."}, indent=4), media_type="application/json")