Initial commit: import from sinmb79/Gov-chat-bot

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
airkjw
2026-03-26 12:49:43 +09:00
commit a16c972dbb
104 changed files with 8063 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
from abc import ABC, abstractmethod
from app.providers.base import SearchResult
class VectorDBProvider(ABC):
@abstractmethod
async def upsert(
self,
tenant_id: str,
doc_id: str,
chunks: list[str],
embeddings: list[list[float]],
metadatas: list[dict],
) -> int:
...
@abstractmethod
async def search(
self,
tenant_id: str,
query_vec: list[float],
top_k: int = 3,
threshold: float = 0.70,
) -> list[SearchResult]:
...
@abstractmethod
async def delete(self, tenant_id: str, doc_id: str) -> None:
...