From db5159fc2464060b6f3081dfc9e35130e62aa79d Mon Sep 17 00:00:00 2001 From: Yannick Stephan Date: Thu, 20 Feb 2025 14:47:31 +0100 Subject: [PATCH 1/3] added missing type --- lightrag/operate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightrag/operate.py b/lightrag/operate.py index a79192ac..73fa2f88 100644 --- a/lightrag/operate.py +++ b/lightrag/operate.py @@ -573,7 +573,7 @@ async def kg_query( global_config: dict[str, str], hashing_kv: BaseKVStorage | None = None, system_prompt: str | None = None, -) -> str: +) -> str | AsyncIterator[str]: # Handle cache use_model_func = global_config["llm_model_func"] args_hash = compute_args_hash(query_param.mode, query, cache_type="query") From 3c9908b94ae621aa511ebd94e3cbf822abf05b7a Mon Sep 17 00:00:00 2001 From: Yannick Stephan Date: Wed, 26 Feb 2025 12:11:28 +0100 Subject: [PATCH 2/3] fixed lint --- lightrag/lightrag.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lightrag/lightrag.py b/lightrag/lightrag.py index 09bedf94..cfe422e0 100644 --- a/lightrag/lightrag.py +++ b/lightrag/lightrag.py @@ -539,9 +539,16 @@ class LightRAG: split_by_character, split_by_character_only ) - def insert_custom_chunks(self, full_text: str, text_chunks: list[str], doc_id: str | list[str] | None = None) -> None: + def insert_custom_chunks( + self, + full_text: str, + text_chunks: list[str], + doc_id: str | list[str] | None = None, + ) -> None: loop = always_get_an_event_loop() - loop.run_until_complete(self.ainsert_custom_chunks(full_text, text_chunks, doc_id)) + loop.run_until_complete( + self.ainsert_custom_chunks(full_text, text_chunks, doc_id) + ) async def ainsert_custom_chunks( self, full_text: str, text_chunks: list[str], doc_id: str | None = None From 8fa45556d0ffe5aa654fd81b76550c2ac2800c7c Mon Sep 17 00:00:00 2001 From: Yannick Stephan Date: Wed, 26 Feb 2025 12:12:08 +0100 Subject: [PATCH 3/3] updated version to 1.2.2 --- lightrag/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightrag/__init__.py b/lightrag/__init__.py index 04f71139..250c2ae8 100644 --- a/lightrag/__init__.py +++ b/lightrag/__init__.py @@ -1,5 +1,5 @@ from .lightrag import LightRAG as LightRAG, QueryParam as QueryParam -__version__ = "1.2.1" +__version__ = "1.2.2" __author__ = "Zirui Guo" __url__ = "https://github.com/HKUDS/LightRAG"