type: Literal["file_search"]

The type of the file search tool. Always file_search.

vector_store_ids: List[str]

The IDs of the vector stores to search.

filters: Optional[Filters]

A filter to apply.

One of the following:
class FiltersComparisonFilter: …

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

key: str

The key to compare against the value.

type: Literal["eq", "ne", "gt", 5 more]

Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.

  • eq: equals
  • ne: not equal
  • gt: greater than
  • gte: greater than or equal
  • lt: less than
  • lte: less than or equal
  • in: in
  • nin: not in
One of the following:
"eq"
"ne"
"gt"
"gte"
"lt"
"lte"
"in"
"nin"
value: Union[str, float, bool, List[Union[str, float]]]

The value to compare against the attribute key; supports string, number, or boolean types.

One of the following:
str
float
bool
List[Union[str, float]]
One of the following:
str
float
class FiltersCompoundFilter: …

Combine multiple filters using and or or.

filters: List[FiltersCompoundFilterFilter]

Array of filters to combine. Items can be ComparisonFilter or CompoundFilter.

One of the following:
class FiltersCompoundFilterFilterComparisonFilter: …

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

key: str

The key to compare against the value.

type: Literal["eq", "ne", "gt", 5 more]

Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.

  • eq: equals
  • ne: not equal
  • gt: greater than
  • gte: greater than or equal
  • lt: less than
  • lte: less than or equal
  • in: in
  • nin: not in
One of the following:
"eq"
"ne"
"gt"
"gte"
"lt"
"lte"
"in"
"nin"
value: Union[str, float, bool, List[Union[str, float]]]

The value to compare against the attribute key; supports string, number, or boolean types.

One of the following:
str
float
bool
List[Union[str, float]]
One of the following:
str
float
object
type: Literal["and", "or"]

Type of operation: and or or.

One of the following:
"and"
"or"
max_num_results: Optional[int]

The maximum number of results to return. This number should be between 1 and 50 inclusive.

ranking_options: Optional[RankingOptions]

Ranking options for search.

ranker: Optional[Literal["auto", "default-2024-11-15"]]

The ranker to use for the file search.

One of the following:
"auto"
"default-2024-11-15"
score_threshold: Optional[float]

The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.