gpt4free
gpt4free copied to clipboard
Curlm alread closed! quitting from process_data
Bug description
from g4f.client import AsyncClient
import asyncio
import sys
if sys.platform.startswith('win'):
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
async def main():
client = AsyncClient()
response = await client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": "Say this is a test"}],
)
print(response.choices[0].message.content)
asyncio.run(main())
When I run the code, I get a warning. Output:
F:\...\.venv\lib\site-packages\curl_cffi\aio.py:205: UserWarning: Curlm alread closed! quitting from process_data
warnings.warn("Curlm alread closed! quitting from process_data")
This is a test.
Environment
- python version: 3.10.11
- package version: g4f[all]==0.2.9.11
Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.
Closing due to inactivity.
I am also experiencing this. @Zapzatron Did you ever find a solution?
I am also experiencing this. @Zapzatron Did you ever find a solution? did you solve this problem?
I just don't use gpt4free :)
The problem remains, how can it be fixed?