From 83484c0a5658b023bcef930aee5099a4fc059cb4 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Sat, 20 Apr 2024 15:41:49 +0200 Subject: Add workers and use_colors options to api --- examples/ecosia.py | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 examples/ecosia.py (limited to 'examples/ecosia.py') diff --git a/examples/ecosia.py b/examples/ecosia.py deleted file mode 100644 index 5a2ae520..00000000 --- a/examples/ecosia.py +++ /dev/null @@ -1,18 +0,0 @@ -import asyncio -import g4f -from g4f.client import AsyncClient - -async def main(): - client = AsyncClient( - provider=g4f.Provider.Ecosia, - ) - async for chunk in client.chat.completions.create( - [{"role": "user", "content": "happy dogs on work. write some lines"}], - g4f.models.default, - stream=True, - green=True, - ): - print(chunk.choices[0].delta.content or "", end="") - print(f"\nwith {chunk.model}") - -asyncio.run(main()) \ No newline at end of file -- cgit v1.2.3