From ef3fdfa892c982b8262661d909a2113ed6cbb6b8 Mon Sep 17 00:00:00 2001 From: Kacper Kwapisz Date: Tue, 14 Nov 2023 12:39:38 +0100 Subject: Update __init__.py fixed the line where it checks if stream is requested. I made the change because before it ignored what the user typed because there was a invalid conversion from the boolean to string where the if stream clause would always be true. Simple workaround :) --- g4f/api/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'g4f') diff --git a/g4f/api/__init__.py b/g4f/api/__init__.py index 8eceb743..166395db 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: -- cgit v1.2.3