diff options
author | kqlio67 <kqlio67@users.noreply.github.com> | 2024-09-11 20:59:11 +0200 |
---|---|---|
committer | kqlio67 <kqlio67@users.noreply.github.com> | 2024-09-11 20:59:11 +0200 |
commit | 2e3d60a5f1d60f7443e78e4b5b692bb76a78d51c (patch) | |
tree | 7092b25c81ccf413fff89942e5c023fa646190c1 | |
parent | Updated g4f/models.py (diff) | |
download | gpt4free-2e3d60a5f1d60f7443e78e4b5b692bb76a78d51c.tar gpt4free-2e3d60a5f1d60f7443e78e4b5b692bb76a78d51c.tar.gz gpt4free-2e3d60a5f1d60f7443e78e4b5b692bb76a78d51c.tar.bz2 gpt4free-2e3d60a5f1d60f7443e78e4b5b692bb76a78d51c.tar.lz gpt4free-2e3d60a5f1d60f7443e78e4b5b692bb76a78d51c.tar.xz gpt4free-2e3d60a5f1d60f7443e78e4b5b692bb76a78d51c.tar.zst gpt4free-2e3d60a5f1d60f7443e78e4b5b692bb76a78d51c.zip |
-rw-r--r-- | g4f/Provider/Bixin123.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/g4f/Provider/Bixin123.py b/g4f/Provider/Bixin123.py index 694a2eff..39422c93 100644 --- a/g4f/Provider/Bixin123.py +++ b/g4f/Provider/Bixin123.py @@ -2,6 +2,7 @@ from __future__ import annotations from aiohttp import ClientSession import json +import random from .base_provider import AsyncGeneratorProvider, ProviderModelMixin from ..typing import AsyncResult, Messages from .helper import format_prompt @@ -31,6 +32,10 @@ class Bixin123(AsyncGeneratorProvider, ProviderModelMixin): return cls.default_model @classmethod + def generate_fingerprint(cls) -> str: + return str(random.randint(100000000, 999999999)) + + @classmethod async def create_async_generator( cls, model: str, @@ -45,7 +50,7 @@ class Bixin123(AsyncGeneratorProvider, ProviderModelMixin): "accept-language": "en-US,en;q=0.9", "cache-control": "no-cache", "content-type": "application/json", - "fingerprint": "988148794", + "fingerprint": cls.generate_fingerprint(), "origin": cls.url, "pragma": "no-cache", "priority": "u=1, i", |