Fix linting error

This commit is contained in:
zrguo
2025-02-11 13:32:24 +08:00
parent 2d2ed19095
commit 5ffbb548ad
2 changed files with 7 additions and 3 deletions

View File

@@ -116,7 +116,7 @@ class JsonDocStatusStorage(DocStatusStorage):
for k, v in self._data.items()
if v["status"] == DocStatus.PROCESSED
}
async def get_processing_docs(self) -> dict[str, DocProcessingStatus]:
"""Get all processing documents"""
return {

View File

@@ -113,7 +113,9 @@ async def openai_complete_if_cache(
openai_async_client = (
AsyncOpenAI(default_headers=default_headers, api_key=api_key)
if base_url is None
else AsyncOpenAI(base_url=base_url, default_headers=default_headers, api_key=api_key)
else AsyncOpenAI(
base_url=base_url, default_headers=default_headers, api_key=api_key
)
)
kwargs.pop("hashing_kv", None)
kwargs.pop("keyword_extraction", None)
@@ -304,7 +306,9 @@ async def openai_embed(
openai_async_client = (
AsyncOpenAI(default_headers=default_headers, api_key=api_key)
if base_url is None
else AsyncOpenAI(base_url=base_url, default_headers=default_headers, api_key=api_key)
else AsyncOpenAI(
base_url=base_url, default_headers=default_headers, api_key=api_key
)
)
response = await openai_async_client.embeddings.create(
model=model, input=texts, encoding_format="float"