From 5e513a71040b1c217990e59d0e98b4aaceeb71e1 Mon Sep 17 00:00:00 2001 From: Larfii <834462287@qq.com> Date: Thu, 10 Oct 2024 12:09:24 +0800 Subject: [PATCH 1/2] update --- lightrag/__init__.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lightrag/__init__.py b/lightrag/__init__.py index a83afba3..dc497cd4 100644 --- a/lightrag/__init__.py +++ b/lightrag/__init__.py @@ -1,5 +1,5 @@ from .lightrag import LightRAG, QueryParam -__version__ = "0.0.1" +__version__ = "0.0.2" __author__ = "Zirui Guo" __url__ = "https://github.com/HKUDS/GraphEdit" diff --git a/setup.py b/setup.py index df1c3cf4..849fabfe 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ with open("./requirements.txt") as f: deps.append(line.strip()) setuptools.setup( - name="light-rag", + name="lightrag-hku", url=vars2readme["__url__"], version=vars2readme["__version__"], author=vars2readme["__author__"], From bf84cf18a11006cb1767c550d84f4b393dfb32a8 Mon Sep 17 00:00:00 2001 From: LarFii <834462287@qq.com> Date: Fri, 11 Oct 2024 11:22:17 +0800 Subject: [PATCH 2/2] update utils.py --- lightrag/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightrag/utils.py b/lightrag/utils.py index c75b4270..9496cf34 100644 --- a/lightrag/utils.py +++ b/lightrag/utils.py @@ -94,11 +94,11 @@ def wrap_embedding_func_with_attrs(**kwargs): def load_json(file_name): if not os.path.exists(file_name): return None - with open(file_name) as f: + with open(file_name, encoding="utf-8") as f: return json.load(f) def write_json(json_obj, file_name): - with open(file_name, "w") as f: + with open(file_name, "w", encoding="utf-8") as f: json.dump(json_obj, f, indent=2, ensure_ascii=False) def encode_string_by_tiktoken(content: str, model_name: str = "gpt-4o"):