Fix mypy and lint error

This commit is contained in:
Sameer Kankute
2025-11-26 11:24:11 +05:30
parent 241ad27843
commit c1636bdb92
3 changed files with 7 additions and 8 deletions
@@ -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
+7 -4
View File
@@ -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