Open xiao-yuling opened 11 months ago
I met exactly the same problem:
Traceback (most recent call last):
File ".\toolbox.py", line 156, in decorated
yield from f(main_input, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, *args, **kwargs)
File ".\crazy_functions\Langchain知识库.py", line 96, in 读取知识库作答
resp, prompt = kai.answer_with_archive_by_id(txt, kai_id)
File ".\crazy_functions\crazy_utils.py", line 706, in answer_with_archive_by_id
resp, prompt = self.qa_handle.get_knowledge_based_conent_test(
File "D:\ProgramData\anaconda3\envs\gptac\lib\site-packages\zh_langchain\chains\local_doc_qa.py", line 238, in get_knowledge_based_conent_test
embedding = self.vector_store.embedding_function(query)
TypeError: 'HuggingFaceEmbeddings' object is not callable
文件加载完毕,正在生成向量库
Batches: 100%|██████████| 42/42 [00:06<00:00, 6.13it/s]
代理配置 http://127.0.0.1:7890, 代理所在地:Japan - Google LLC
gpt-3.5-turbo : 0 : 'HuggingFaceEmbeddings' object is not callable ..........
gpt-3.5-turbo : 1 : File "D:\ProgramData\anaconda3\envs\gptac\lib\site-packages\zh_langchain\chains\local_doc_qa.py", l ..........
gpt-3.5-turbo : 2 : Traceback (most recent call last):
File ".\toolbox.py", line 156, in decorated
yield from f(ma ..........
from langchain_core.embeddings import Embeddings if isinstance(self.vector_store.embedding_function, Embeddings): embedding = self.vector_store.embedding_function.embed_query(s) else: embedding = self.vector_store.embedding_function(s)
@binary-husky
@binary-husky 我也遇到相同的问题
Traceback (most recent call last): File ".\crazy_functions\Langchain知识库.py", line 28, in 知识库问答 from zh_langchain import construct_vector_store ModuleNotFoundError: No module named 'zh_langchain'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File ".\toolbox.py", line 156, in decorated yield from f(main_input, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, *args, **kwargs) File ".\crazy_functions\Langchain知识库.py", line 35, in 知识库问答 try_install_deps(['zh_langchain==0.2.1', 'pypinyin'], reload_m=['pypinyin', 'zh_langchain']) File ".\crazy_functions\crazy_utils.py", line 770, in try_install_deps importlib.reload(import(m)) ModuleNotFoundError: No module named 'pypinyin'
Installation Method | 安装方法与平台
Pip Install (I used latest requirements.txt)
Version | 版本
Latest | 最新版
OS | 操作系统
Windows
Describe the bug | 简述
知识库问答 TypeError: 'HuggingFaceEmbeddings' object is not callable
[Local Message] 插件调用出错:
Traceback (most recent call last): File ".\toolbox.py", line 156, in decorated yield from f(main_input, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, *args, **kwargs) File ".\crazy_functions\Langchain知识库.py", line 96, in 读取知识库作答 resp, prompt = kai.answer_with_archive_by_id(txt, kai_id) File ".\crazy_functions\crazy_utils.py", line 706, in answer_with_archive_by_id resp, prompt = self.qa_handle.get_knowledge_based_conent_test( File "C:\Users\pc\AppData\Roaming\Python\Python310\site-packages\zh_langchain\chains\local_doc_qa.py", line 238, in get_knowledge_based_conent_test embedding = self.vector_store.embedding_function(query) TypeError: 'HuggingFaceEmbeddings' object is not callable
当前代理可用性:
代理配置 无, 代理所在地:Japan
Screen Shot | 有帮助的截图
Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback(如有) + 帮助我们复现的测试材料样本(如有)
No response