Neo4j Graph Database & Analytics – The Leader in Graph Databases

部署neo4j

https://stackoverflow.com/questions/76207890/neo4j-docker-compose-to-kubernetes

nerdctl run \\
    -d \\
    --restart always \\
    --publish=7474:7474 --publish=7687:7687 \\
    --env NEO4J_AUTH=neo4j/q1w2e3r4\\
    --env='NEO4JLABS_PLUGINS=["apoc"]'\\
    neo4j
    

Untitled

Untitled

设置Neo4j APOC插件

这一步只需要在 docker 启动命令中加入 --env='NEO4JLABS_PLUGINS=["apoc"]' 环境变量即可

APOC plugin for Neo4j cannot be installed

Untitled

Untitled

neo4j不同的端口的用途

Untitled

访问Neo4j Browser

<http://ip:7474/browser/>

Untitled

LangChain集成Xinfrence

Xorbits Inference (Xinference) | 🦜️🔗 LangChain

from langchain_core.prompts import PromptTemplate
# <https://python.langchain.com/v0.2/docs/integrations/providers/xinference/>

llm = Xinference(
    server_url="<http://10.1.107.74:30008>",
    model_uid="qwen2-instruct"  # replace model_uid with the model UID return from launching the model
)

LLM图转换器

<aside> 💡 从文本中提取图数据可以将非结构化信息转换为结构化格式,从而实现对复杂关系和模式的深入洞察和更高效的导航。LLMGraphTransformer通过利用 LLM 解析和分类实体及其关系,将文本文档转换为结构化图文档。选择 LLM 模型会显著影响输出,从而确定提取的图数据的准确性和细微差别。

</aside>