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/MagickPenAsk.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/MagickPenAsk.py')
-rw-r--r-- | g4f/Provider/MagickPenAsk.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/g4f/Provider/MagickPenAsk.py b/g4f/Provider/MagickPenAsk.py index 21a9e422..39f062f0 100644 --- a/g4f/Provider/MagickPenAsk.py +++ b/g4f/Provider/MagickPenAsk.py @@ -8,11 +8,11 @@ from .helper import format_prompt class MagickPenAsk(AsyncGeneratorProvider, ProviderModelMixin): - url = "https://api.magickpen.com" - api_endpoint = "/ask" + url = "https://magickpen.com/ask" + api_endpoint = "https://api.magickpen.com/ask" working = True supports_gpt_4 = True - default_model = "gpt-4o" + default_model = "gpt-4o-mini" @classmethod async def create_async_generator( @@ -37,14 +37,14 @@ class MagickPenAsk(AsyncGeneratorProvider, ProviderModelMixin): "sec-fetch-mode": "cors", "sec-fetch-site": "same-site", "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36", - 'X-API-Secret': 'W252GY255JVYBS9NAM' # this for some reason is just hardcoded in the .js, it makes no sense + 'X-API-Secret': 'W252GY255JVYBS9NAM' } async with ClientSession(headers=headers) as session: data = { "query": format_prompt(messages), "plan": "Pay as you go" } - 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: |