Langchain-Chatchat
Langchain-Chatchat copied to clipboard
lite模式启动,新建知识库报错
2024-02-20 15:46:17.709 Uncaught app exception
Traceback (most recent call last):
File "E:\gpt\Langchain-Chatchat\venv\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 535, in _run_script
exec(code, module.dict)
File "E:\gpt\Langchain-Chatchat\webui.py", line 64, in
🤖
嗨,@theFarHorizon!很高兴再次见到你。希望你今天过得不错!
您遇到的问题可能是由于 'bge-large-zh' 模型未在在线嵌入模型列表中导致的。在代码中,当您处于lite模式时,会使用 list_online_embed_models() 函数获取可用的在线嵌入模型列表。如果 'bge-large-zh' 不在此函数返回的列表中,当您尝试选择它时,将会出现 ValueError。
这是相关的代码:
if is_lite:
embed_models = list_online_embed_models()
else:
embed_models = list_embed_models() + list_online_embed_models()
embed_model = cols[1].selectbox(
"Embedding 模型",
embed_models,
index=embed_models.index(EMBEDDING_MODEL),
key="embed_model",
)
要解决此问题,您需要确保 'bge-large-zh' 在在线嵌入模型列表中。如果没有,您可能需要将其添加到列表中,或者使用其他可用的嵌入模型。
此外,我在Langchain-Chatchat的问题库中找到了一个类似的已解决问题:bge-large-zh-v1.5无法建立知识库。该问题的建议解决方案是:确定模型文件是huggingface下的吗?有可能模型没全。这可能对您有所帮助。
请注意,list_online_embed_models() 函数的具体实现在提供的上下文中并未明确定义。从上下文中,我们可以推断 list_online_embed_models() 是一个返回在线嵌入模型列表的函数,这些模型可用于Langchain-Chatchat应用。
希望这些信息对您有所帮助。如果您有任何其他问题或需要进一步的澄清,请随时告诉我。
Sources
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
配置文件对吗。咋都没找到这个模型
2024-02-20 15:46:17.709 Uncaught app exception Traceback (most recent call last): File "E:\gpt\Langchain-Chatchat\venv\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 535, in _run_script exec(code, module.dict) File "E:\gpt\Langchain-Chatchat\webui.py", line 64, in pages[selected_page]["func"](api=api, is_lite=is_lite) File "E:\gpt\Langchain-Chatchat\webui_pages\knowledge_base\knowledge_base.py", line 117, in knowledge_base_page index=embed_models.index(EMBEDDING_MODEL), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: 'bge-large-zh' is not in list
你好,问题解决了吗,我也遇到同样的问题'bge-large-zh-v1.5' is not in list
@jet2you 用在线的EMBEDDING_MODEL
