fix(adapter): close final foundation review
This commit is contained in:
@@ -18,6 +18,15 @@ class VectorCapabilities:
|
||||
class VectorHealth:
|
||||
ok: bool
|
||||
detail: str | None = None
|
||||
read_configured: bool = False
|
||||
read_reachable: bool | None = None
|
||||
read_detail: str | None = None
|
||||
write_configured: bool = False
|
||||
write_reachable: bool | None = None
|
||||
write_detail: str | None = None
|
||||
expected_dimension: int | None = None
|
||||
observed_dimensions: tuple[int, ...] = ()
|
||||
dimension_compatible: bool | None = None
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@@ -37,6 +46,16 @@ class VectorWriteUnavailable(VectorStoreError):
|
||||
"""Raised when a deployment has no vector writer credential."""
|
||||
|
||||
|
||||
class VectorReadUnavailable(VectorStoreError):
|
||||
"""Raised when a deployment has no vector reader credential."""
|
||||
|
||||
|
||||
def require_positive_limit(limit: int) -> None:
|
||||
"""Reject coercible values: vector limits are exact positive integers."""
|
||||
if type(limit) is not int or limit <= 0:
|
||||
raise ValueError("Vector search limit must be a positive integer")
|
||||
|
||||
|
||||
@runtime_checkable
|
||||
class VectorStore(Protocol):
|
||||
@property
|
||||
@@ -63,6 +82,7 @@ __all__ = [
|
||||
"VectorHealth",
|
||||
"VectorHit",
|
||||
"VectorRecord",
|
||||
"VectorReadUnavailable",
|
||||
"VectorStore",
|
||||
"VectorStoreError",
|
||||
"VectorWriteRecord",
|
||||
|
||||
Reference in New Issue
Block a user