diff options
author | Heiner Lohaus <heiner@lohaus.eu> | 2023-10-01 10:36:09 +0200 |
---|---|---|
committer | Heiner Lohaus <heiner@lohaus.eu> | 2023-10-01 10:36:09 +0200 |
commit | bb481a03ab1a64e47731eb28e461e1dc1d655383 (patch) | |
tree | d067cdee641ace34713c77e28f3636a038d2baf1 /g4f/Provider | |
parent | Disable PerplexityAi Provider (diff) | |
download | gpt4free-bb481a03ab1a64e47731eb28e461e1dc1d655383.tar gpt4free-bb481a03ab1a64e47731eb28e461e1dc1d655383.tar.gz gpt4free-bb481a03ab1a64e47731eb28e461e1dc1d655383.tar.bz2 gpt4free-bb481a03ab1a64e47731eb28e461e1dc1d655383.tar.lz gpt4free-bb481a03ab1a64e47731eb28e461e1dc1d655383.tar.xz gpt4free-bb481a03ab1a64e47731eb28e461e1dc1d655383.tar.zst gpt4free-bb481a03ab1a64e47731eb28e461e1dc1d655383.zip |
Diffstat (limited to 'g4f/Provider')
-rw-r--r-- | g4f/Provider/Wewordle.py | 2 | ||||
-rw-r--r-- | g4f/Provider/Ylokh.py | 10 |
2 files changed, 3 insertions, 9 deletions
diff --git a/g4f/Provider/Wewordle.py b/g4f/Provider/Wewordle.py index a7bdc722..26d040c3 100644 --- a/g4f/Provider/Wewordle.py +++ b/g4f/Provider/Wewordle.py @@ -8,7 +8,7 @@ from .base_provider import AsyncProvider class Wewordle(AsyncProvider): url = "https://wewordle.org" - working = True + working = False supports_gpt_35_turbo = True @classmethod diff --git a/g4f/Provider/Ylokh.py b/g4f/Provider/Ylokh.py index c7b92089..2187eb78 100644 --- a/g4f/Provider/Ylokh.py +++ b/g4f/Provider/Ylokh.py @@ -1,8 +1,8 @@ from __future__ import annotations import json -from aiohttp import ClientSession +from ..requests import AsyncSession from .base_provider import AsyncGeneratorProvider from ..typing import AsyncGenerator @@ -23,14 +23,8 @@ class Ylokh(AsyncGeneratorProvider): ) -> AsyncGenerator: model = model if model else "gpt-3.5-turbo" headers = { - "User-Agent" : "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0", - "Accept" : "*/*", - "Accept-language" : "de,en-US;q=0.7,en;q=0.3", "Origin" : cls.url, "Referer" : cls.url + "/", - "Sec-Fetch-Dest" : "empty", - "Sec-Fetch-Mode" : "cors", - "Sec-Fetch-Site" : "same-origin", } data = { "messages": messages, @@ -43,7 +37,7 @@ class Ylokh(AsyncGeneratorProvider): "stream": stream, **kwargs } - async with ClientSession( + async with AsyncSession( headers=headers ) as session: async with session.post("https://chatapi.ylokh.xyz/v1/chat/completions", json=data, proxy=proxy) as response: |