网站制作学习网AI→正文:ImportError: cannot import name 'GPTVectorStoreIndex' from 'llama_inde
字体:

ImportError: cannot import name 'GPTVectorStoreIndex' from 'llama_inde

AI 2024/7/7 22:21:10  点击:不统计


 在使用llama_index时,看到网上很多案例是:

from llama_index import GPTVectorStoreIndex
 
结果安装llama_index后 执行上面代码 出现错误:
ImportError: cannot import name 'GPTVectorStoreIndex' from 'llama_index'
 
查询官方文档很多都更新位置了,需要使用旧的版本。
这里使用 0.9.48 可以使用,重新安装扩展后就可以使用了。

pip install llama-index==0.9.48
 
重新安装扩展后 ImportError: cannot import name 'GPTVectorStoreIndex' from 'llama_index' 不再显示。

·上一篇:autogen中的多agent group组对话 >>    ·下一篇:vscode Cursor接入deepseek等ai服务 >>
推荐文章
最新文章