mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-18 06:29:47 +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
|
|
@ -9,6 +9,7 @@ from typing import Annotated, Any, Literal
|
|||
from pydantic import BaseModel, Field
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
from llama_stack.apis.vector_io import SearchRankingOptions as FileSearchRankingOptions
|
||||
from llama_stack.schema_utils import json_schema_type, register_schema
|
||||
|
||||
# NOTE(ashwin): this file is literally a copy of the OpenAI responses API schema. We should probably
|
||||
|
|
@ -400,11 +401,6 @@ class OpenAIResponseInputToolFunction(BaseModel):
|
|||
strict: bool | None = None
|
||||
|
||||
|
||||
class FileSearchRankingOptions(BaseModel):
|
||||
ranker: str | None = None
|
||||
score_threshold: float | None = Field(default=0.0, ge=0.0, le=1.0)
|
||||
|
||||
|
||||
@json_schema_type
|
||||
class OpenAIResponseInputToolFileSearch(BaseModel):
|
||||
type: Literal["file_search"] = "file_search"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue