summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Wewordle.py
diff options
context:
space:
mode:
authorHeiner Lohaus <heiner.lohaus@netformic.com>2023-08-24 21:32:22 +0200
committerHeiner Lohaus <heiner.lohaus@netformic.com>2023-08-24 21:32:22 +0200
commit69ca98ac85743edd76ac6ce49feb233cd5365099 (patch)
tree75f931bc48497ae9e8cfec5ed234574263c11381 /g4f/Provider/Wewordle.py
parentImprove providers with tests (diff)
downloadgpt4free-69ca98ac85743edd76ac6ce49feb233cd5365099.tar
gpt4free-69ca98ac85743edd76ac6ce49feb233cd5365099.tar.gz
gpt4free-69ca98ac85743edd76ac6ce49feb233cd5365099.tar.bz2
gpt4free-69ca98ac85743edd76ac6ce49feb233cd5365099.tar.lz
gpt4free-69ca98ac85743edd76ac6ce49feb233cd5365099.tar.xz
gpt4free-69ca98ac85743edd76ac6ce49feb233cd5365099.tar.zst
gpt4free-69ca98ac85743edd76ac6ce49feb233cd5365099.zip
Diffstat (limited to '')
-rw-r--r--g4f/Provider/Wewordle.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/g4f/Provider/Wewordle.py b/g4f/Provider/Wewordle.py
index cef209c9..8e106716 100644
--- a/g4f/Provider/Wewordle.py
+++ b/g4f/Provider/Wewordle.py
@@ -10,12 +10,13 @@ from .base_provider import BaseProvider
class Wewordle(BaseProvider):
- url = "https://wewordle.org/gptapi/v1/android/turbo"
+ url = "https://wewordle.org/"
working = True
supports_gpt_35_turbo = True
- @staticmethod
+ @classmethod
def create_completion(
+ cls,
model: str,
messages: list[dict[str, str]],
stream: bool,
@@ -62,8 +63,7 @@ class Wewordle(BaseProvider):
},
}
- url = "https://wewordle.org/gptapi/v1/android/turbo"
- response = requests.post(url, headers=headers, data=json.dumps(data))
+ response = requests.post(f"{cls.url}gptapi/v1/android/turbo", headers=headers, data=json.dumps(data))
response.raise_for_status()
_json = response.json()
if "message" in _json: