fix(vector): separate write transport fields
This commit is contained in:
@@ -20,6 +20,15 @@ class VectorHealth:
|
||||
detail: str | None = None
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class VectorWriteRecord:
|
||||
"""A canonical record plus transport-neutral, precomputed vector data."""
|
||||
|
||||
record: VectorRecord
|
||||
embedding: list[float]
|
||||
content_hash: str
|
||||
|
||||
|
||||
class VectorStoreError(Exception):
|
||||
"""Base error exposed by vector adapters."""
|
||||
|
||||
@@ -46,7 +55,7 @@ class VectorStore(Protocol):
|
||||
|
||||
def existing_hashes(self, collection: str, kinds: list[str]) -> dict[str, str]: ...
|
||||
|
||||
def upsert(self, collection: str, records: list[VectorRecord]) -> int: ...
|
||||
def upsert(self, collection: str, records: list[VectorWriteRecord]) -> int: ...
|
||||
|
||||
|
||||
__all__ = [
|
||||
@@ -56,5 +65,6 @@ __all__ = [
|
||||
"VectorRecord",
|
||||
"VectorStore",
|
||||
"VectorStoreError",
|
||||
"VectorWriteRecord",
|
||||
"VectorWriteUnavailable",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user