Fix lint issue

This commit is contained in:
Andrii Lazarchuk
2024-10-28 17:05:38 +02:00
parent 478998bc27
commit 29bf41df4d
2 changed files with 7 additions and 4 deletions

View File

@@ -1,14 +1,13 @@
import os import os
import logging import logging
logging.basicConfig(format="%(levelname)s:%(message)s", level=logging.INFO)
from lightrag import LightRAG, QueryParam from lightrag import LightRAG, QueryParam
from lightrag.llm import ollama_model_complete, ollama_embedding from lightrag.llm import ollama_model_complete, ollama_embedding
from lightrag.utils import EmbeddingFunc from lightrag.utils import EmbeddingFunc
WORKING_DIR = "./dickens" WORKING_DIR = "./dickens"
logging.basicConfig(format="%(levelname)s:%(message)s", level=logging.INFO)
if not os.path.exists(WORKING_DIR): if not os.path.exists(WORKING_DIR):
os.mkdir(WORKING_DIR) os.mkdir(WORKING_DIR)

View File

@@ -155,7 +155,11 @@ class LightRAG:
) )
self.llm_model_func = limit_async_func_call(self.llm_model_max_async)( 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): def insert(self, string_or_strings):