mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-27 20:19:37 +00:00
Fix mypy and lint error
This commit is contained in:
@@ -209,7 +209,6 @@ class GeminiVectorStoreConfig(BaseVectorStoreConfig):
|
||||
|
||||
# Process each grounding chunk
|
||||
for chunk in grounding_chunks:
|
||||
web_chunk = chunk.get("web")
|
||||
retrieved_context = chunk.get("retrievedContext")
|
||||
|
||||
if retrieved_context:
|
||||
@@ -318,7 +317,6 @@ class GeminiVectorStoreConfig(BaseVectorStoreConfig):
|
||||
store_name = response_data.get("name", "")
|
||||
display_name = response_data.get("displayName", "")
|
||||
create_time = response_data.get("createTime", "")
|
||||
update_time = response_data.get("updateTime", "")
|
||||
|
||||
# Convert ISO timestamp to Unix timestamp
|
||||
import datetime
|
||||
|
||||
@@ -14,7 +14,7 @@ from __future__ import annotations
|
||||
|
||||
import base64
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, cast
|
||||
|
||||
import httpx
|
||||
|
||||
@@ -49,11 +49,14 @@ class BaseRAGIngestion(ABC):
|
||||
|
||||
# Extract configs from options
|
||||
self.ocr_config = ingest_options.get("ocr")
|
||||
self.chunking_strategy: Dict[str, Any] = ingest_options.get(
|
||||
"chunking_strategy", {"type": "auto"}
|
||||
self.chunking_strategy: Dict[str, Any] = cast(
|
||||
Dict[str, Any],
|
||||
ingest_options.get("chunking_strategy") or {"type": "auto"},
|
||||
)
|
||||
self.embedding_config = ingest_options.get("embedding")
|
||||
self.vector_store_config: Dict[str, Any] = ingest_options.get("vector_store") or {}
|
||||
self.vector_store_config: Dict[str, Any] = cast(
|
||||
Dict[str, Any], ingest_options.get("vector_store") or {}
|
||||
)
|
||||
self.ingest_name = ingest_options.get("name")
|
||||
|
||||
@property
|
||||
|
||||
@@ -7,8 +7,6 @@ so this implementation skips the embedding step and directly uploads files.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import base64
|
||||
import json
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, cast
|
||||
|
||||
import httpx
|
||||
|
||||
Reference in New Issue
Block a user