Update README.md

add missing imports to examples in README.md
This commit is contained in:
Haotian Zhang
2024-11-09 14:59:41 -05:00
committed by GitHub
parent 780cf7eeb9
commit a445e556d8

View File

@@ -142,6 +142,7 @@ rag = LightRAG(
```python ```python
from lightrag.llm import hf_model_complete, hf_embedding from lightrag.llm import hf_model_complete, hf_embedding
from transformers import AutoModel, AutoTokenizer from transformers import AutoModel, AutoTokenizer
from lightrag.utils import EmbeddingFunc
# Initialize LightRAG with Hugging Face model # Initialize LightRAG with Hugging Face model
rag = LightRAG( rag = LightRAG(
@@ -172,6 +173,7 @@ Then you only need to set LightRAG as follows:
```python ```python
from lightrag.llm import ollama_model_complete, ollama_embedding from lightrag.llm import ollama_model_complete, ollama_embedding
from lightrag.utils import EmbeddingFunc
# Initialize LightRAG with Ollama model # Initialize LightRAG with Ollama model
rag = LightRAG( rag = LightRAG(