xtekky / gpt4free

The official gpt4free repository | various collection of powerful language models
https://g4f.ai
GNU General Public License v3.0
60.37k stars 13.25k forks source link

Changed async API from 0.3.2.9 on #2266

Open gioannid opened 1 week ago

gioannid commented 1 week ago

Bug description Async API has changed since 0.3.2.9, apparently deliberately, now e.g. async_client.Completions.create(stream=True) needs to be awaited. Documentation needs to be updated, e.g. in https://github.com/xtekky/gpt4free/blob/main/docs/async_client.md:

stream = await client.chat.completions.create( model="gpt-4", messages=[{"role": "user", "content": "Say this is a test"}], stream=True, ... )

Environment

github-actions[bot] commented 3 days ago

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.