summaryrefslogtreecommitdiffstats
path: root/g4f
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g4f/Provider/AItianhu.py2
-rw-r--r--g4f/Provider/Acytoo.py8
-rw-r--r--g4f/Provider/AiService.py2
-rw-r--r--g4f/Provider/DfeHub.py2
-rw-r--r--g4f/Provider/Wewordle.py8
5 files changed, 11 insertions, 11 deletions
diff --git a/g4f/Provider/AItianhu.py b/g4f/Provider/AItianhu.py
index e8e5714a..9f5440bc 100644
--- a/g4f/Provider/AItianhu.py
+++ b/g4f/Provider/AItianhu.py
@@ -7,7 +7,7 @@ from .base_provider import BaseProvider
class AItianhu(BaseProvider):
- url = "https://www.aitianhu.com/api/chat-process"
+ url = "https://www.aitianhu.com/"
working = False
supports_gpt_35_turbo = True
diff --git a/g4f/Provider/Acytoo.py b/g4f/Provider/Acytoo.py
index 2edd9efd..975e914b 100644
--- a/g4f/Provider/Acytoo.py
+++ b/g4f/Provider/Acytoo.py
@@ -7,12 +7,13 @@ from .base_provider import BaseProvider
class Acytoo(BaseProvider):
- url = "https://chat.acytoo.com/api/completions"
+ url = "https://chat.acytoo.com/"
working = True
supports_gpt_35_turbo = True
- @staticmethod
+ @classmethod
def create_completion(
+ cls,
model: str,
messages: list[dict[str, str]],
stream: bool,
@@ -21,8 +22,7 @@ class Acytoo(BaseProvider):
headers = _create_header()
payload = _create_payload(messages, kwargs.get('temperature', 0.5))
- url = "https://chat.acytoo.com/api/completions"
- response = requests.post(url=url, headers=headers, json=payload)
+ response = requests.post("{cls.url}api/completions", headers=headers, json=payload)
response.raise_for_status()
response.encoding = "utf-8"
yield response.text
diff --git a/g4f/Provider/AiService.py b/g4f/Provider/AiService.py
index 2c0d5de2..3453bfd9 100644
--- a/g4f/Provider/AiService.py
+++ b/g4f/Provider/AiService.py
@@ -5,7 +5,7 @@ from .base_provider import BaseProvider
class AiService(BaseProvider):
- url = "https://aiservice.vercel.app/api/chat/answer"
+ url = "https://aiservice.vercel.app/"
working = False
supports_gpt_35_turbo = True
diff --git a/g4f/Provider/DfeHub.py b/g4f/Provider/DfeHub.py
index 5a7b22e1..6f96ec7a 100644
--- a/g4f/Provider/DfeHub.py
+++ b/g4f/Provider/DfeHub.py
@@ -9,7 +9,7 @@ from .base_provider import BaseProvider
class DfeHub(BaseProvider):
- url = "https://chat.dfehub.com/api/chat"
+ url = "https://chat.dfehub.com/"
supports_stream = True
supports_gpt_35_turbo = True
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: