Comments (9)
我尝试使用 pip install llama_index.core
重新安装之后,报错变成了
ValidationError
1 validation error for DataSource
component_type
subclass of BaseComponent expected (type=type_error.subclass; expected_class=BaseComponent)
File "/home/ureka/history_rag-master/executor.py", line 12, in
from llama_index.core import ServiceContext, StorageContext
pydantic.v1.error_wrappers.ValidationError: 1 validation error for DataSource
component_type
subclass of BaseComponent expected (type=type_error.subclass; expected_class=BaseComponent)
from history_rag.
pip list|grep llama
from history_rag.
llama-index 0.9.39
llama-index-core 0.10.13
llamaindex-py-client 0.1.13
from history_rag.
把这些都pip uninstall
然后只装这个llama-index 0.9.39
from history_rag.
按照pip list|grep llama
操作以后,返回的结果是llama-index 0.9.39
,但是运行后报错:
ImportError: cannot import name 'ServiceContext' from 'llama_index.core' (/home/ureka/.local/lib/python3.10/site-packages/llama_index/core/init.py)
from history_rag.
完整的stacktrace打印一下?
from history_rag.
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/ureka/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/main.py", line 39, in
cli.main()
File "/home/ureka/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
run()
File "/home/ureka/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
runpy.run_path(target, run_name="main")
File "/home/ureka/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
return _run_module_code(code, init_globals, run_name,
File "/home/ureka/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/home/ureka/.vscode-server/extensions/ms-python.debugpy-2024.0.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
exec(code, run_globals)
File "/home/ureka/history_rag-master/executor.py", line 12, in
from llama_index.core import ServiceContext, StorageContextImportError: cannot import name 'ServiceContext' from 'llama_index.core' (/home/ureka/.local/lib/python3.10/site-packages/llama_index/core/init.py)
from history_rag.
exec(code, run_globals)
File "/home/ureka/history_rag-master/executor.py", line 12, in
from llama_index.core import ServiceContext, StorageContextImportError: cannot import name 'ServiceContext' from 'llama_index.core' (/home/ureka/.local/lib/python3.10/site-packages/llama_index/core/init.py)
Line 12 in 506fd22
为什么第12行并不一致
#你的import
from llama_index.core import ServiceContext, StorageContext
#我的import
from llama_index import ServiceContext, StorageContext
from history_rag.
我也不清楚.....但是我按照你的代码修改了以后便可以运行了,谢谢大佬!
from history_rag.
Related Issues (20)
- 我项目运行起来,在提问的阶段,提问后报错。 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
- 90006 zilliz cloud连接异常 HOT 2
- 90020错误 HOT 7
- raise MilvusException( pymilvus.exceptions.MilvusException: <MilvusException: (code=2, message=Fail connecting to server on localhost:19530, illegal connection params or server unavailable)> HOT 5
- pipeline模式下使用GPT-4,无法复现演示的问题 HOT 3
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.