From 29bf41df4d26ae822bca89cc4e86cc84b44ba934 Mon Sep 17 00:00:00 2001 From: Andrii Lazarchuk Date: Mon, 28 Oct 2024 17:05:38 +0200 Subject: [PATCH] Fix lint issue --- examples/lightrag_ollama_demo.py | 5 ++--- lightrag/lightrag.py | 6 +++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/lightrag_ollama_demo.py b/examples/lightrag_ollama_demo.py index 0a704024..1a320d13 100644 --- a/examples/lightrag_ollama_demo.py +++ b/examples/lightrag_ollama_demo.py @@ -1,14 +1,13 @@ import os import logging - -logging.basicConfig(format="%(levelname)s:%(message)s", level=logging.INFO) - from lightrag import LightRAG, QueryParam from lightrag.llm import ollama_model_complete, ollama_embedding from lightrag.utils import EmbeddingFunc WORKING_DIR = "./dickens" +logging.basicConfig(format="%(levelname)s:%(message)s", level=logging.INFO) + if not os.path.exists(WORKING_DIR): os.mkdir(WORKING_DIR) diff --git a/lightrag/lightrag.py b/lightrag/lightrag.py index 955651fb..89ee1df5 100644 --- a/lightrag/lightrag.py +++ b/lightrag/lightrag.py @@ -155,7 +155,11 @@ class LightRAG: ) self.llm_model_func = limit_async_func_call(self.llm_model_max_async)( - partial(self.llm_model_func, hashing_kv=self.llm_response_cache, **self.llm_model_kwargs) + partial( + self.llm_model_func, + hashing_kv=self.llm_response_cache, + **self.llm_model_kwargs, + ) ) def insert(self, string_or_strings):