summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/Acytoo.py
diff options
context:
space:
mode:
authorTekky <98614666+xtekky@users.noreply.github.com>2023-08-25 18:22:38 +0200
committerGitHub <noreply@github.com>2023-08-25 18:22:38 +0200
commitb2baf46e3cb2ad27d666217bb14c54d89fbb8c66 (patch)
tree60052aad3746053eb4aec5b7e44d75404f4d11fe /g4f/Provider/Acytoo.py
parent~ | Merge pull request #841 (diff)
parentMerge branch 'main' into up (diff)
downloadgpt4free-b2baf46e3cb2ad27d666217bb14c54d89fbb8c66.tar
gpt4free-b2baf46e3cb2ad27d666217bb14c54d89fbb8c66.tar.gz
gpt4free-b2baf46e3cb2ad27d666217bb14c54d89fbb8c66.tar.bz2
gpt4free-b2baf46e3cb2ad27d666217bb14c54d89fbb8c66.tar.lz
gpt4free-b2baf46e3cb2ad27d666217bb14c54d89fbb8c66.tar.xz
gpt4free-b2baf46e3cb2ad27d666217bb14c54d89fbb8c66.tar.zst
gpt4free-b2baf46e3cb2ad27d666217bb14c54d89fbb8c66.zip
Diffstat (limited to 'g4f/Provider/Acytoo.py')
-rw-r--r--g4f/Provider/Acytoo.py8
1 files changed, 4 insertions, 4 deletions
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