Skip to content

pbl-nl/appl-kgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

appl-kgraph

Knowledge Graph Implementation

Acknowledgement

This is an reimplementation of LightRAG and PathRAG.

Preparation

  1. Clone this repo to a folder of your choice
  2. In a folder of your choice, create a file named ".env"
  3. Using Azure OpenAI Services, enter the variables in the .env file:
    AZURE_OPENAI_API_KEY = "..."
    AZURE_OPENAI_ENDPOINT = "..."
    AZURE_OPENAI_API_VERSION = "..."
    AZURE_OPENAI_LLM_DEPLOYMENT_NAME = "..."
    AZURE_OPENAI_EMB_DEPLOYMENT_NAME = "..."
    LLM_PROVIDER = "azure" The value of this variable can be found in your Azure OpenAI Services subscription
  4. Using OpenAI Services, enter the variables in the .env file:
    OPENAI_API_KEY = "..."
    OPENAI_BASE_URL = "..."
    OPENAI_LLM_MODEL = "..."
    OPENAI_EMBEDDINGS_MODEL = "..."
    LLM_PROVIDER = "openai"
  5. In case your documents include .docx files, make sure that Microsoft Word is installed.

Pip virtual environment setup

  1. Open an Anaconda prompt or other command prompt
  2. Go to the root folder of the project and create a Python environment with pip with python -m venv venv
    This will create a basic virtual environment folder named venv in the root of your project folder NB: The chosen name of the environment folder is here venv. It can be changed to a name of your choice
  3. Activate this environment with venv\Scripts\activate for windows or source venv/bin/activate for MacOS
  4. All required packages can now be installed with pip install -r requirements.txt

How to use

Go to the root folder of the project and run python graph/main.py on the terminal.

About

Basic Knowledge Graph Implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •