Comments (6)
你再确认一下llamaindex的版本(
pip list |grep llama
),clone一个原版的 试一下直接使用cmdline而不是ide(vscode, pycharm...etc)
尝试了一下使用windows11自带的terminal,成功实现了调用。
看来应该是我自己电脑上ide配置的问题,后续如果我解决了我再继续更新办法
from history_rag.
Line 15 in fa38cf0
Line 21 in fa38cf0
我先确认一下你遇到的问题,你的意思是说executor.py
中的这几行无法运行吗,并且在llama-index 0.9.39
的情况下。
from history_rag.
Line 15 in fa38cf0
Line 21 in fa38cf0
我先确认一下你遇到的问题,你的意思是说
executor.py
中的这几行无法运行吗,并且在llama-index 0.9.39
的情况下。
我遇到的情况应该是两部分,一个是 项目在vscode下遇到的"模块名和py文件名相同时的冲突",这部分可能是vscode的python extension或者是其他部分有关系,我准备稍后用pycharm试试,如果没有问题,我再更新.
【更新】在pycharm尝试了一次,两部分情况又都遇到了
第二个就是我修改了以下几处的,替换同名 或者是参考llama-index仓库里其他版本的类似写法(global_handler
)
from llama_index.core.query_pipeline.components import (...)
(components模块下的components.py无法识别)
from llama_index.core.llms.llm import LLM
(llm 模块下的llm.py无法识别)
from llama_index.core.llms.llm import ChatMessage, MessageRole
from llama_index.core import global_handler
(llama_index.core模块下没有global_handler)
以上操作后,可以顺利执行:
1 cmd窗口执行python cli.py
2 项目窗口执行milvus
3 项目窗口执行build *.txt
4 项目窗口输入ask -d
或ask
5 项目窗口输入华雄是被谁杀死的
上述步骤后,我就会遇到标题里的ValueError报错.
我也尝试通过给以上逐行代码添加断点,来尝试捕捉,但我在vscode 里面打开debug模式后,第一次触发断点会是在
Raised Exceptions
情况下,出现在 executor.py文件中
具体的Exception位置如下:
Line 237 in fa38cf0
Exception has occurred: ValueError
Cannot use llm_chat_callback on an instance without a callback_manager attribute.
File "C:\Users\A\VscodeProjects\history_rag\executor.py", line 237, in query
response = self.query_engine.query(question)
File "C:\Users\A\VscodeProjects\history_rag\cli.py", line 86, in query
ans = self._executor.query(question)
File "C:\Users\A\VscodeProjects\history_rag\cli.py", line 109, in question_answer
self.query(question)
File "C:\Users\A\VscodeProjects\history_rag\cli.py", line 74, in parse_input
self.question_answer()
File "C:\Users\A\VscodeProjects\history_rag\cli.py", line 53, in run
self.parse_input(command_text)
File "C:\Users\A\VscodeProjects\history_rag\cli.py", line 120, in <module>
cli.run()
ValueError: Cannot use llm_chat_callback on an instance without a callback_manager attribute.
from history_rag.
你再确认一下llamaindex的版本(pip list |grep llama
),clone一个原版的
试一下直接使用cmdline而不是ide(vscode, pycharm...etc)
from history_rag.
I am using llama-index version 0.10.0 and getting the same error. The command pip list | grep llama
also didn't work.
from history_rag.
I am using llama-index version 0.10.0 and getting the same error. The command
pip list | grep llama
also didn't work.
Hi Ishita. About this, I have searched answer and
it seems like that the llama-index
library have been rewritten after version 0.10.x.
I believe llama-index
works good at version>=0.9.4x
You can run pip install llama-index==0.9.39 --upgrade
and (if you are facing same problems I mentioned,) run history_rag via cmd
instead of some IDEs .
from history_rag.
Related Issues (20)
- ImportError:cannot import name 'ServiceContext' from 'llama_index.core' HOT 9
- 运行时提示ImportError: ('Cannot import sentence-transformers or torch package,', 'please `pip install torch sentence-transformers`') HOT 23
- RuntimeError: {'code': 90019, 'message': 'Pipeline server error: call server failed, msg=internal error'} HOT 1
- 下载本地模型后依旧报错Connection error. OSError: [Errno 101] Network is unreachable HOT 5
- 我项目运行起来,在提问的阶段,提问后报错。 HOT 1
- 想知道怎么转换txt到json HOT 2
- built文件后报错,不知晓原因,求教 HOT 9
- 文档分个模块和向量化 HOT 8
- Error Code 429 HOT 2
- 知识库构建索引出错 HOT 1
- 输入ask后报错 HOT 2
- 提问之后的api接口调用错误 HOT 1
- 关于非历史文本的输入 HOT 4
- 把模型换成gpt-3.5-turbo了,但是回答准确率比较低。 HOT 1
- Exception has occurred: MilvusException <MilvusException: (code=2, message=Fail connecting to server on localhost:19530, illegal connection params or server unavailable)> HOT 14
- [bug]关于比较大的文本输入构建索引失败 HOT 1
- milvus standalone时不时崩溃 HOT 4
- pipeline方案报错 zilliz pipeline 连接异常 {"code":80001 HOT 1
- 在进入ask模式时出错 HOT 4
- 900006的报错 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from history_rag.