diff options
author | zukixa <56563509+zukixa@users.noreply.github.com> | 2024-08-29 08:03:32 +0200 |
---|---|---|
committer | zukixa <56563509+zukixa@users.noreply.github.com> | 2024-08-29 08:03:32 +0200 |
commit | bda2d679275ebd6bc2a3aa84f8fbc93967bead63 (patch) | |
tree | 8a36ace98ab138e1eff134a5ed8891fd3c817b5b /g4f/Provider/MagickPenChat.py | |
parent | 8 providers improved (diff) | |
download | gpt4free-bda2d679275ebd6bc2a3aa84f8fbc93967bead63.tar gpt4free-bda2d679275ebd6bc2a3aa84f8fbc93967bead63.tar.gz gpt4free-bda2d679275ebd6bc2a3aa84f8fbc93967bead63.tar.bz2 gpt4free-bda2d679275ebd6bc2a3aa84f8fbc93967bead63.tar.lz gpt4free-bda2d679275ebd6bc2a3aa84f8fbc93967bead63.tar.xz gpt4free-bda2d679275ebd6bc2a3aa84f8fbc93967bead63.tar.zst gpt4free-bda2d679275ebd6bc2a3aa84f8fbc93967bead63.zip |
Diffstat (limited to 'g4f/Provider/MagickPenChat.py')
-rw-r--r-- | g4f/Provider/MagickPenChat.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/g4f/Provider/MagickPenChat.py b/g4f/Provider/MagickPenChat.py index 40ef32c1..ade85c4b 100644 --- a/g4f/Provider/MagickPenChat.py +++ b/g4f/Provider/MagickPenChat.py @@ -8,12 +8,11 @@ from .helper import format_prompt class MagickPenChat(AsyncGeneratorProvider, ProviderModelMixin): - url = "https://api.magickpen.com" - api_endpoint = "/chat/free" + url = "https://magickpen.com/chat" + api_endpoint = "https://api.magickpen.com/chat/free" working = True supports_gpt_4 = True default_model = "gpt-4o-mini" - @classmethod async def create_async_generator( cls, @@ -44,7 +43,7 @@ class MagickPenChat(AsyncGeneratorProvider, ProviderModelMixin): data = { "history": [{"role": "user", "content": format_prompt(messages)}] } - 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() async for chunk in response.content: if chunk: |