From 7b26e20db0b4862bb8a204a48eb3a19a7c916095 Mon Sep 17 00:00:00 2001 From: razrab Date: Mon, 13 Nov 2023 14:11:44 +0300 Subject: Added back list_ignored_providers parameter to ChatCompletion.create method in api. --- g4f/api/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'g4f') 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") -- cgit v1.2.3