summaryrefslogtreecommitdiffstats
path: root/etc/examples/ecosia.py
diff options
context:
space:
mode:
authorabc <98614666+xtekky@users.noreply.github.com>2024-05-31 17:17:34 +0200
committerabc <98614666+xtekky@users.noreply.github.com>2024-05-31 17:17:34 +0200
commitdd409d3f1ae3300146d43c7d2e870915cb79c9ef (patch)
tree7944b367ac8406a65e38d49dd923f242daed4b52 /etc/examples/ecosia.py
parentUpdate README.md (diff)
downloadgpt4free-dd409d3f1ae3300146d43c7d2e870915cb79c9ef.tar
gpt4free-dd409d3f1ae3300146d43c7d2e870915cb79c9ef.tar.gz
gpt4free-dd409d3f1ae3300146d43c7d2e870915cb79c9ef.tar.bz2
gpt4free-dd409d3f1ae3300146d43c7d2e870915cb79c9ef.tar.lz
gpt4free-dd409d3f1ae3300146d43c7d2e870915cb79c9ef.tar.xz
gpt4free-dd409d3f1ae3300146d43c7d2e870915cb79c9ef.tar.zst
gpt4free-dd409d3f1ae3300146d43c7d2e870915cb79c9ef.zip
Diffstat (limited to '')
-rw-r--r--etc/examples/ecosia.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/etc/examples/ecosia.py b/etc/examples/ecosia.py
deleted file mode 100644
index 5a2ae520..00000000
--- a/etc/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