fix(g4f/Provider/Allyfy.py): update API endpoint to full URL

This commit is contained in:
kqlio67 2024-10-03 00:29:03 +03:00
parent 2103ea87b5
commit 8ab55107c8

View File

@ -9,8 +9,8 @@ from .helper import format_prompt
class Allyfy(AsyncGeneratorProvider): class Allyfy(AsyncGeneratorProvider):
url = "https://chatbot.allyfy.chat" url = "https://allyfy.chat"
api_endpoint = "/api/v1/message/stream/super/chat" api_endpoint = "https://chatbot.allyfy.chat/api/v1/message/stream/super/chat"
working = True working = True
supports_gpt_35_turbo = True supports_gpt_35_turbo = True
@ -53,7 +53,7 @@ class Allyfy(AsyncGeneratorProvider):
"packageName": "com.cch.allyfy.webh", "packageName": "com.cch.allyfy.webh",
} }
} }
async with session.post(f"{cls.url}{cls.api_endpoint}", json=data, proxy=proxy) as response: async with session.post(f"{cls.api_endpoint}", json=data, proxy=proxy) as response:
response.raise_for_status() response.raise_for_status()
full_response = [] full_response = []
async for line in response.content: async for line in response.content: