老子也不知道

<span style="font-size: 40px"><b>文种玉</b></span><br><br> / 2024-09-20 / 原文

命令

  1. down graph rag

  2. pip install graphrag

  3. 在根目录下创建一个 ragtest/input 文件夹,在input下放入文件

  4. python -m graphrag.index --init --root ./ragtest --resume data
    python -m graphrag.index --init --root ./ragtest
    --resume xxx => 如果上一次运行失败,下一次运行的时候,就会接着上次失败的哪里接着运行,而不会重新运行
    初始化完毕之后,会创建两个文件
    .env => 需要配置 key
    settings.yaml => 其他的配置,比如模型,key,类型...

  5. python -m graphrag.index --root ./ragtest
    --data ./ragtest/output/doupo/artifacts => 指定具体加载的那个一个索引

全局的

python -m graphrag.query --root ./ragtest --method global "What are the top themes in this story?"

本地的

python -m graphrag.query --root ./ragtest --method local "Who is Scrooge, and what are his main relationships?"

问题①
❌ create_summarized_entities
❌ Errors occurred during the pipeline run, see logs for more details.

问题②
❌ create_base_entity_graph
❌ Errors occurred during the pipeline run, see logs for more details.
解决 => 在.env环境当中填入你的key即可

问题③
❌ create_base_text_units
❌ Errors occurred during the pipeline run, see logs for more details.
解决 => 没有输入 知识库