diff options
author | Tekky <98614666+xtekky@users.noreply.github.com> | 2023-11-18 12:24:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-18 12:24:39 +0100 |
commit | 2fcb3f949bbde7f5380acc68dc6b1f938dec12bc (patch) | |
tree | 035bd400b4057a744b29a0ebee96579bfbf429f6 /g4f/Provider/Hashnode.py | |
parent | ~ | g4f `v-0.1.8.5` (diff) | |
parent | Add AiChatOnline, ChatgptDemoAi, ChatgptNext Providers (diff) | |
download | gpt4free-2fcb3f949bbde7f5380acc68dc6b1f938dec12bc.tar gpt4free-2fcb3f949bbde7f5380acc68dc6b1f938dec12bc.tar.gz gpt4free-2fcb3f949bbde7f5380acc68dc6b1f938dec12bc.tar.bz2 gpt4free-2fcb3f949bbde7f5380acc68dc6b1f938dec12bc.tar.lz gpt4free-2fcb3f949bbde7f5380acc68dc6b1f938dec12bc.tar.xz gpt4free-2fcb3f949bbde7f5380acc68dc6b1f938dec12bc.tar.zst gpt4free-2fcb3f949bbde7f5380acc68dc6b1f938dec12bc.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/Provider/Hashnode.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g4f/Provider/Hashnode.py b/g4f/Provider/Hashnode.py index f562787b..a287fa7c 100644 --- a/g4f/Provider/Hashnode.py +++ b/g4f/Provider/Hashnode.py @@ -1,10 +1,10 @@ from __future__ import annotations -import secrets from aiohttp import ClientSession from ..typing import AsyncResult, Messages from .base_provider import AsyncGeneratorProvider +from .helper import get_random_hex class SearchTypes(): quick = "quick" @@ -55,7 +55,7 @@ class Hashnode(AsyncGeneratorProvider): response.raise_for_status() cls._sources = (await response.json())["result"] data = { - "chatId": secrets.token_hex(16).zfill(32), + "chatId": get_random_hex(), "history": messages, "prompt": prompt, "searchType": search_type, |