feat(rag): make embedding and retrieving available

This commit is contained in:
Junyan Qin
2025-07-16 21:17:18 +08:00
parent f731115805
commit 2f2db4d445
20 changed files with 180 additions and 368 deletions

View File

@@ -1,6 +1,6 @@
from __future__ import annotations
import abc
from typing import Any, List, Dict
from typing import Any, Dict
import numpy as np
@@ -9,10 +9,10 @@ class VectorDatabase(abc.ABC):
def add_embeddings(
self,
collection: str,
ids: List[str],
embeddings: np.ndarray,
metadatas: List[Dict[str, Any]],
documents: List[str],
ids: list[str],
embeddings_list: list[list[float]],
metadatas: list[dict[str, Any]],
documents: list[str],
) -> None:
"""向指定 collection 添加向量数据。"""
pass