From 3b9c28fae9bd24dda1ae75045fae657a40ff791b Mon Sep 17 00:00:00 2001 From: yangdx Date: Thu, 22 May 2025 10:46:03 +0800 Subject: [PATCH] Fix linting --- lightrag/llm/llama_index_impl.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lightrag/llm/llama_index_impl.py b/lightrag/llm/llama_index_impl.py index 988ae842..b8dc39f3 100644 --- a/lightrag/llm/llama_index_impl.py +++ b/lightrag/llm/llama_index_impl.py @@ -95,7 +95,7 @@ async def llama_index_complete_if_cache( prompt: str, system_prompt: Optional[str] = None, history_messages: List[dict] = [], - chat_kwargs = {}, + chat_kwargs={}, ) -> str: """Complete the prompt using LlamaIndex.""" try: @@ -122,7 +122,9 @@ async def llama_index_complete_if_cache( # Add current prompt formatted_messages.append(ChatMessage(role=MessageRole.USER, content=prompt)) - response: ChatResponse = await model.achat(messages=formatted_messages, **chat_kwargs) + response: ChatResponse = await model.achat( + messages=formatted_messages, **chat_kwargs + ) # In newer versions, the response is in message.content content = response.message.content