diff options
author | Tekky <98614666+xtekky@users.noreply.github.com> | 2024-06-09 15:04:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-09 15:04:24 +0200 |
commit | 52a37e054d69fadb1aae3a8983cbfaae98e62983 (patch) | |
tree | 93f1129d6d37b6f72d144c200872f391f0136aae /g4f | |
parent | Merge pull request #2031 from Zedai00/main (diff) | |
parent | Update `HuggingChat` provider (diff) | |
download | gpt4free-52a37e054d69fadb1aae3a8983cbfaae98e62983.tar gpt4free-52a37e054d69fadb1aae3a8983cbfaae98e62983.tar.gz gpt4free-52a37e054d69fadb1aae3a8983cbfaae98e62983.tar.bz2 gpt4free-52a37e054d69fadb1aae3a8983cbfaae98e62983.tar.lz gpt4free-52a37e054d69fadb1aae3a8983cbfaae98e62983.tar.xz gpt4free-52a37e054d69fadb1aae3a8983cbfaae98e62983.tar.zst gpt4free-52a37e054d69fadb1aae3a8983cbfaae98e62983.zip |
Diffstat (limited to 'g4f')
-rw-r--r-- | g4f/Provider/HuggingChat.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/g4f/Provider/HuggingChat.py b/g4f/Provider/HuggingChat.py index ac324390..cf2a89da 100644 --- a/g4f/Provider/HuggingChat.py +++ b/g4f/Provider/HuggingChat.py @@ -23,7 +23,8 @@ class HuggingChat(AsyncGeneratorProvider, ProviderModelMixin): 'NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO', 'mistralai/Mistral-7B-Instruct-v0.2', 'meta-llama/Meta-Llama-3-70B-Instruct', - 'microsoft/Phi-3-mini-4k-instruct' + 'microsoft/Phi-3-mini-4k-instruct', + '01-ai/Yi-1.5-34B-Chat' ] model_aliases = { "mistralai/Mistral-7B-Instruct-v0.1": "mistralai/Mistral-7B-Instruct-v0.2" @@ -102,7 +103,7 @@ class HuggingChat(AsyncGeneratorProvider, ProviderModelMixin): elif line["type"] == "stream": token = line["token"] if first_token: - token = token.lstrip() + token = token.lstrip().replace('\u0000', '') first_token = False yield token elif line["type"] == "finalAnswer": |