Cinnamon / kotaemon

An open-source RAG-based tool for chatting with your documents.
https://cinnamon.github.io/kotaemon/
Apache License 2.0
16.51k stars 1.27k forks source link

[BUG] - GraphRAG dependencies not installed. GraphRAG retriever pipeline will not work properly #279

Closed fyxc closed 1 month ago

fyxc commented 1 month ago

Description

I am trying to use graphrag. but it shows, GraphRAG dependencies not installed. GraphRAG retriever pipeline will not work properly. I am using Azure ai instead of openai key (for both llm&embed). here is my setting. also wondering how I can use azure document intelligence, I have set up the key and endpoint in the env file, but seems it doesn't work

Screenshot 2024-09-11 at 4 10 49 PM Screenshot 2024-09-11 at 4 11 36 PM Screenshot 2024-09-11 at 4 12 50 PM Screenshot 2024-09-11 at 4 13 25 PM Screenshot 2024-09-11 at 4 16 42 PM

Reproduction steps

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Screenshots

![DESCRIPTION](LINK.png)

Logs

No response

Browsers

No response

OS

No response

Additional information

No response

taprosoft commented 1 month ago

Please run this command to install additional packages for GraphRAG. pip install graphrag future.

Setup Azure OpenAI with GraphRAG will take more effort, see the env variables setup here https://microsoft.github.io/graphrag/posts/config/env_vars/

For AzureDI, you need to update .env file and do something like export $(cat .env | xargs) to load the environment variables prior to python launch.py

fyxc commented 1 month ago

tried both openai and azure-ai, neither works

error message: ❌ create_base_entity_graph

None

⠋ GraphRAG Indexer

├── Loading Input (text) - 1 files loaded (0 filtered) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 0:00:00

├── create_base_text_units

├── create_base_extracted_entities

├── create_summarized_entities

└── create_base_entity_graph❌ Errors occurred during the pipeline run, see logs for more details.

I think it because env file was not read correctly. I use dotenv run -- python app.py in MacOS,

for azure ai, my setting is

settings for GraphRAG

GRAPHRAG_API_BASE = https://azureaitestxxxopenai.azure.com/ GRAPHRAG_API_VERSION =2024-02-15-preview GRAPHRAG_API_KEY = 3xxxx GRAPHRAG_LLM_API_KEY = 3xxxx GRAPHRAG_API_ORGANIZATION = xxx GRAPHRAG_LLM_TYPE = azure_openai_chat GRAPHRAG_LLM_DEPLOYMENT_NAME = gpt4o-api GRAPHRAG_LLM_MODEL=gpt-4o-mini GRAPHRAG_EMBEDDING_API_KEY = 3xxxx GRAPHRAG_EMBEDDING_TYPE = azure_openai_embedding GRAPHRAG_EMBEDDING_DEPLOYMENT_NAME = text-embed-test GRAPHRAG_EMBEDDING_MODEL=text-embedding-3-small

it doesn't work, so I switched to openai key, but still got the same error GRAPHRAG_API_KEY=skxxxx GRAPHRAG_LLM_MODEL=gpt-4o-mini GRAPHRAG_EMBEDDING_MODEL=text-embedding-3-small

fyxc commented 1 month ago

openai key works. it turns out a conflict between settings in UI and settings in env. still working on to make azure works

abhinavchawla7 commented 1 month ago

i get no folder found error

for name in self._accessor.listdir(self):

FileNotFoundError: [WinError 3] The system cannot find the path specified: