Open rickywu opened 2 months ago
Just like me, is it because the .env file is not configured? However, the installation description does not indicate that configuration is required.
I solved the problem using the following approach.
mkdir indexing
.env
file. You can refer to env-example.txt for configuration data.gradio index_app.py
Hey! So sorry for the confusion. The way GraphRAG is built is to allow you to quickly create and initialize your own indexing directory. This is why the ROOT_DIR and INPUT_DIR are variables you can alter to point to whichever folder directory you need. Here are the basic instructions grafted from the GraphRAG docs that explains the logic:
Create the required input directory: This is where the input for .txt files for Indexing data and the output results will be stored. Also includes the Prompts for Prompt Tuning. - ./indexing
mkdir -p ./indexing/input
Copy sample data folder input/
to ./indexing
. You can add your own data here in .txt format.
cp input/* ./indexing/input
Initialize the ./indexing folder to create the required files:
python -m graphrag.index --init --root ./indexing
Move the settings.yaml file, this is the main predefined config file configured with local models :
mv settings.yaml ./indexing
Here are the docs with the straight-forward version and a bit more info: https://microsoft.github.io/graphrag/posts/get_started/
Hi, I follow the steps:
but got
graphrag.config.errors.ApiKeyMissingError: API Key is required for Completion API. Please set
either the OPENAI_API_KEY, GRAPHRAG_API_KEY or GRAPHRAG_LLM_API_KEY environment variable.
⠋ GraphRAG Indexer
I'm sure it's in .env and also run export this var
Do I need run indexing before or just run gradio graph_app.py?