mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-19 03:19:40 +00:00
feat: support filters in file search
# What does this PR do? ## Test Plan
This commit is contained in:
parent
90d03552d4
commit
1c56b9133a
13 changed files with 449 additions and 63 deletions
|
|
@ -157,6 +157,11 @@ VectorStoreChunkingStrategy = Annotated[
|
|||
register_schema(VectorStoreChunkingStrategy, name="VectorStoreChunkingStrategy")
|
||||
|
||||
|
||||
class SearchRankingOptions(BaseModel):
|
||||
ranker: str | None = None
|
||||
score_threshold: float | None = Field(default=0.0, ge=0.0, le=1.0)
|
||||
|
||||
|
||||
@json_schema_type
|
||||
class VectorStoreFileLastError(BaseModel):
|
||||
code: Literal["server_error"] | Literal["rate_limit_exceeded"]
|
||||
|
|
@ -319,7 +324,7 @@ class VectorIO(Protocol):
|
|||
query: str | list[str],
|
||||
filters: dict[str, Any] | None = None,
|
||||
max_num_results: int | None = 10,
|
||||
ranking_options: dict[str, Any] | None = None,
|
||||
ranking_options: SearchRankingOptions | None = None,
|
||||
rewrite_query: bool | None = False,
|
||||
) -> VectorStoreSearchResponsePage:
|
||||
"""Search for chunks in a vector store.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue