zrguo commited on
Commit
b07c805
·
unverified ·
2 Parent(s): 3f8f926 a3a4079

Merge pull request #793 from VeiledTee/patch-1

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -237,7 +237,7 @@ rag = LightRAG(
237
 
238
  * If you want to use Hugging Face models, you only need to set LightRAG as follows:
239
  ```python
240
- from lightrag.llm import hf_model_complete, hf_embedding
241
  from transformers import AutoModel, AutoTokenizer
242
  from lightrag.utils import EmbeddingFunc
243
 
@@ -250,7 +250,7 @@ rag = LightRAG(
250
  embedding_func=EmbeddingFunc(
251
  embedding_dim=384,
252
  max_token_size=5000,
253
- func=lambda texts: hf_embedding(
254
  texts,
255
  tokenizer=AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2"),
256
  embed_model=AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
 
237
 
238
  * If you want to use Hugging Face models, you only need to set LightRAG as follows:
239
  ```python
240
+ from lightrag.llm import hf_model_complete, hf_embed
241
  from transformers import AutoModel, AutoTokenizer
242
  from lightrag.utils import EmbeddingFunc
243
 
 
250
  embedding_func=EmbeddingFunc(
251
  embedding_dim=384,
252
  max_token_size=5000,
253
+ func=lambda texts: hf_embed(
254
  texts,
255
  tokenizer=AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2"),
256
  embed_model=AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")