Implement RAG with Knowledge Graph and Llama-Index
위 문서를 보면서 예제를 진행함. llama-index Version이 달라서 시행착오를 조금 겪었음.
folder: kg
llama-index: 0.10.26v
python: 3.11.7v
tomasmcm/zephyr-7b-beta – Replicate
.env 해두기
사전 작업들이 좀 필요함
Install Required Dependencies
kg % pipenv shell
pipenv install llama-index-core llama-index-llms-replicate llama-index-embeddings-huggingface llama-index-readers-file
pipenv install pyvis Ipython pypdf replicate
Enabling Diagnostic Logging
import logging
import sys
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout))
Import required dependencies