summaryrefslogtreecommitdiffstats
path: root/g4f/api/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'g4f/api/__init__.py')
-rw-r--r--g4f/api/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/g4f/api/__init__.py b/g4f/api/__init__.py
index 8eceb743..d8798ef2 100644
--- a/g4f/api/__init__.py
+++ b/g4f/api/__init__.py
@@ -78,7 +78,7 @@ class Api:
item_data['messages'] = ast.literal_eval(item_data.get('messages'))
model = item_data.get('model')
- stream = item_data.get('stream')
+ stream = True if item_data.get("stream") == "True" else False
messages = item_data.get('messages')
try:
@@ -86,7 +86,7 @@ class Api:
model=model,
stream=stream,
messages=messages,
- list_ignored_providers=self.list_ignored_providers)
+ ignored=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")