Fixed missing imports bug and fixed linting
This commit is contained in:
@@ -41,7 +41,6 @@ __author__ = "lightrag Team"
|
||||
__status__ = "Production"
|
||||
|
||||
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
@@ -49,7 +48,7 @@ if sys.version_info < (3, 9):
|
||||
from typing import AsyncIterator
|
||||
else:
|
||||
from collections.abc import AsyncIterator
|
||||
import pipmaster as pm # Pipmaster for dynamic library install
|
||||
import pipmaster as pm # Pipmaster for dynamic library install
|
||||
|
||||
# install specific modules
|
||||
if not pm.is_installed("openai"):
|
||||
@@ -78,6 +77,7 @@ from lightrag.types import GPTKeywordExtractionFormat
|
||||
import numpy as np
|
||||
from typing import Union
|
||||
|
||||
|
||||
@retry(
|
||||
stop=stop_after_attempt(3),
|
||||
wait=wait_exponential(multiplier=1, min=4, max=10),
|
||||
@@ -141,7 +141,6 @@ async def openai_complete_if_cache(
|
||||
return content
|
||||
|
||||
|
||||
|
||||
async def openai_complete(
|
||||
prompt, system_prompt=None, history_messages=[], keyword_extraction=False, **kwargs
|
||||
) -> Union[str, AsyncIterator[str]]:
|
||||
@@ -205,7 +204,6 @@ async def nvidia_openai_complete(
|
||||
return result
|
||||
|
||||
|
||||
|
||||
@wrap_embedding_func_with_attrs(embedding_dim=1536, max_token_size=8192)
|
||||
@retry(
|
||||
stop=stop_after_attempt(3),
|
||||
|
Reference in New Issue
Block a user