zhangjiawei
commited on
Commit
·
5e99eb8
1
Parent(s):
70f1059
set encoding as utf-8 when reading ./book.txt in examples
Browse files
examples/lightrag_hf_demo.py
CHANGED
|
@@ -30,7 +30,7 @@ rag = LightRAG(
|
|
| 30 |
)
|
| 31 |
|
| 32 |
|
| 33 |
-
with open("./book.txt") as f:
|
| 34 |
rag.insert(f.read())
|
| 35 |
|
| 36 |
# Perform naive search
|
|
|
|
| 30 |
)
|
| 31 |
|
| 32 |
|
| 33 |
+
with open("./book.txt", "r", encoding="utf-8") as f:
|
| 34 |
rag.insert(f.read())
|
| 35 |
|
| 36 |
# Perform naive search
|
examples/lightrag_ollama_demo.py
CHANGED
|
@@ -21,7 +21,7 @@ rag = LightRAG(
|
|
| 21 |
)
|
| 22 |
|
| 23 |
|
| 24 |
-
with open("./book.txt") as f:
|
| 25 |
rag.insert(f.read())
|
| 26 |
|
| 27 |
# Perform naive search
|
|
|
|
| 21 |
)
|
| 22 |
|
| 23 |
|
| 24 |
+
with open("./book.txt", "r", encoding="utf-8") as f:
|
| 25 |
rag.insert(f.read())
|
| 26 |
|
| 27 |
# Perform naive search
|
examples/lightrag_openai_compatible_demo.py
CHANGED
|
@@ -55,7 +55,7 @@ rag = LightRAG(
|
|
| 55 |
)
|
| 56 |
|
| 57 |
|
| 58 |
-
with open("./book.txt") as f:
|
| 59 |
rag.insert(f.read())
|
| 60 |
|
| 61 |
# Perform naive search
|
|
|
|
| 55 |
)
|
| 56 |
|
| 57 |
|
| 58 |
+
with open("./book.txt", "r", encoding="utf-8") as f:
|
| 59 |
rag.insert(f.read())
|
| 60 |
|
| 61 |
# Perform naive search
|
examples/lightrag_openai_demo.py
CHANGED
|
@@ -15,7 +15,7 @@ rag = LightRAG(
|
|
| 15 |
)
|
| 16 |
|
| 17 |
|
| 18 |
-
with open("./book.txt") as f:
|
| 19 |
rag.insert(f.read())
|
| 20 |
|
| 21 |
# Perform naive search
|
|
|
|
| 15 |
)
|
| 16 |
|
| 17 |
|
| 18 |
+
with open("./book.txt", "r", encoding="utf-8") as f:
|
| 19 |
rag.insert(f.read())
|
| 20 |
|
| 21 |
# Perform naive search
|