Fix linting error
Browse files
lightrag/kg/jsondocstatus_impl.py
CHANGED
@@ -116,7 +116,7 @@ class JsonDocStatusStorage(DocStatusStorage):
|
|
116 |
for k, v in self._data.items()
|
117 |
if v["status"] == DocStatus.PROCESSED
|
118 |
}
|
119 |
-
|
120 |
async def get_processing_docs(self) -> dict[str, DocProcessingStatus]:
|
121 |
"""Get all processing documents"""
|
122 |
return {
|
|
|
116 |
for k, v in self._data.items()
|
117 |
if v["status"] == DocStatus.PROCESSED
|
118 |
}
|
119 |
+
|
120 |
async def get_processing_docs(self) -> dict[str, DocProcessingStatus]:
|
121 |
"""Get all processing documents"""
|
122 |
return {
|
lightrag/llm/openai.py
CHANGED
@@ -113,7 +113,9 @@ async def openai_complete_if_cache(
|
|
113 |
openai_async_client = (
|
114 |
AsyncOpenAI(default_headers=default_headers, api_key=api_key)
|
115 |
if base_url is None
|
116 |
-
else AsyncOpenAI(
|
|
|
|
|
117 |
)
|
118 |
kwargs.pop("hashing_kv", None)
|
119 |
kwargs.pop("keyword_extraction", None)
|
@@ -304,7 +306,9 @@ async def openai_embed(
|
|
304 |
openai_async_client = (
|
305 |
AsyncOpenAI(default_headers=default_headers, api_key=api_key)
|
306 |
if base_url is None
|
307 |
-
else AsyncOpenAI(
|
|
|
|
|
308 |
)
|
309 |
response = await openai_async_client.embeddings.create(
|
310 |
model=model, input=texts, encoding_format="float"
|
|
|
113 |
openai_async_client = (
|
114 |
AsyncOpenAI(default_headers=default_headers, api_key=api_key)
|
115 |
if base_url is None
|
116 |
+
else AsyncOpenAI(
|
117 |
+
base_url=base_url, default_headers=default_headers, api_key=api_key
|
118 |
+
)
|
119 |
)
|
120 |
kwargs.pop("hashing_kv", None)
|
121 |
kwargs.pop("keyword_extraction", None)
|
|
|
306 |
openai_async_client = (
|
307 |
AsyncOpenAI(default_headers=default_headers, api_key=api_key)
|
308 |
if base_url is None
|
309 |
+
else AsyncOpenAI(
|
310 |
+
base_url=base_url, default_headers=default_headers, api_key=api_key
|
311 |
+
)
|
312 |
)
|
313 |
response = await openai_async_client.embeddings.create(
|
314 |
model=model, input=texts, encoding_format="float"
|