XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Update `HuggingChat` provider

- Fix null string in response token temporarily - Add new model `01-ai/Yi-1.5-34B-Chat` that works well using Japanese.

0850c811
Eien Mojiki 🍕 <95165750+eienmojiki206@users.noreply.github.com>
提交于

代码差异

1 个文件 +3 -2
Modified g4f/Provider/HuggingChat.py +3 -2
@@ -23,7 +23,8 @@ class HuggingChat(AsyncGeneratorProvider, ProviderModelMixin):
23 23 'NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO',
24 24 'mistralai/Mistral-7B-Instruct-v0.2',
25 25 'meta-llama/Meta-Llama-3-70B-Instruct',
26 'microsoft/Phi-3-mini-4k-instruct'
26 'microsoft/Phi-3-mini-4k-instruct',
27 '01-ai/Yi-1.5-34B-Chat'
27 28 ]
28 29 model_aliases = {
29 30 "mistralai/Mistral-7B-Instruct-v0.1": "mistralai/Mistral-7B-Instruct-v0.2"
@@ -102,7 +103,7 @@ class HuggingChat(AsyncGeneratorProvider, ProviderModelMixin):
102 103 elif line["type"] == "stream":
103 104 token = line["token"]
104 105 if first_token:
105 token = token.lstrip()
106 token = token.lstrip().replace('\u0000', '')
106 107 first_token = False
107 108 yield token
108 109 elif line["type"] == "finalAnswer":