Neo4j+LLM+RAG 环境配置报错处理

开发KG+LLM+RAG程序时遇到以下报错,记录下处理方案:

ValueError: Could not use APOC procedures. Please ensure the APOC plugin is installed in Neo4j and that 'apoc.meta.data()' is allowed in Neo4j configuration

这个参考文章:link
报错原因: 没有安装APOC插件

解决方案,安装插件。我的版本是:neo4j-community-4.4.26

下载对应的:apoc-4.4.0.26-all.jar

link

复制到 $NEO4J_HOME/plugins/

neo4j.exceptions.ClientError: {code: Neo.ClientError.Procedure.ProcedureRegistrationFailed} {message: apoc.meta.data is unavailable because it is sandboxed and has dependencies outside of the sandbox. Sandboxing is controlled by the dbms.security.procedures.unrestricted setting. Only unrestrict procedures you can trust with access to database internals.}

解决方法:

打开Neo4j的配置文件(通常是neo4j.conf),找到dbms.security.procedures.unrestricted这一项。确保该项设置为允许使用apoc插件。你可以将其设置为apoc.*,这将允许所有apoc的过程,或者你也可以根据需要设置更具体的值。

重启Neo4j:保存配置文件并重启Neo4j数据库,以使新的安全设置生效。

相关推荐
Hyyy7 小时前
token是什么?为什么大模型会有上下文长度的限制
程序员·llm·ai编程
阿里云云原生11 小时前
软件工程领域 LLM 驱动的自迭代知识引擎
llm
吴佳浩11 小时前
Hermes Agent 连环 400 真凶找到了:一个 call_id 让人炸毛
人工智能·llm·agent
武子康2 天前
调查研究-186 LangChain 和 LangGraph 的区别:从快速构建 Agent 到生产级工作流编排
人工智能·langchain·llm
JouYY2 天前
简单聊一下Harness层中的人机协同(HITL)
前端框架·llm·agent
AINative软件工程2 天前
LLM 应用的 Bad Case 反馈闭环工程:别再把用户差评丢进客服表了
llm·openai·agent
冬奇Lab3 天前
Agent 系列(23):Web Agent——让 Agent 真正浏览网页
人工智能·llm·agent
冬奇Lab3 天前
每日一个开源项目(第135篇):codebase-memory-mcp - 给 AI Agent 一张代码库的知识图谱
人工智能·开源·llm
黄忠4 天前
大模型之LangGraph技术体系
python·llm
不好听6134 天前
Tool:让大模型长出手脚
llm·agent