From 69ca98ac85743edd76ac6ce49feb233cd5365099 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Thu, 24 Aug 2023 21:32:22 +0200 Subject: Improve provider list --- g4f/Provider/Acytoo.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'g4f/Provider/Acytoo.py') 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 -- cgit v1.2.3