for message in response:
print(message, flush=True, end="")
Ошибка:
Traceback (most recent call last):
File "/Users/username/Desktop/Hi_Tech/test.py", line 4, in
response = g4f.ChatCompletion.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/g4f/__init__.py", line 146, in create
return result if stream else ''.join([str(chunk) for chunk in result])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/g4f/providers/base_provider.py", line 204, in create_completion
yield loop.run_until_complete(await_callback(gen.__anext__))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 664, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/g4f/providers/base_provider.py", line 200, in await_callback
return await callback()
^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/g4f/Provider/Phind.py", line 46, in create_async_generator
data = json.loads(match.group("json"))
^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'