|
7 | 7 |
|
8 | 8 | from .vector_stores.rerank_config_param import RerankConfigParam |
9 | 9 |
|
10 | | -__all__ = ["StoreChunkSearchOptionsParam", "Rerank"] |
| 10 | +__all__ = ["StoreChunkSearchOptionsParam", "Rerank", "Agentic", "AgenticAgenticSearchConfig"] |
11 | 11 |
|
12 | 12 | Rerank: TypeAlias = Union[bool, RerankConfigParam] |
13 | 13 |
|
14 | 14 |
|
| 15 | +class AgenticAgenticSearchConfig(TypedDict, total=False): |
| 16 | + """Configuration for agentic multi-query search.""" |
| 17 | + |
| 18 | + max_rounds: int |
| 19 | + """Maximum number of search rounds""" |
| 20 | + |
| 21 | + queries_per_round: int |
| 22 | + """Maximum queries per round""" |
| 23 | + |
| 24 | + results_per_query: int |
| 25 | + """Results to fetch per query""" |
| 26 | + |
| 27 | + |
| 28 | +Agentic: TypeAlias = Union[bool, AgenticAgenticSearchConfig] |
| 29 | + |
| 30 | + |
15 | 31 | class StoreChunkSearchOptionsParam(TypedDict, total=False): |
16 | 32 | """Options for configuring store chunk searches.""" |
17 | 33 |
|
18 | 34 | score_threshold: float |
19 | 35 | """Minimum similarity score threshold""" |
20 | 36 |
|
21 | 37 | rewrite_query: bool |
22 | | - """Whether to rewrite the query""" |
| 38 | + """Whether to rewrite the query. |
| 39 | +
|
| 40 | + Ignored when agentic is enabled (the agent handles query decomposition). |
| 41 | + """ |
23 | 42 |
|
24 | 43 | rerank: Optional[Rerank] |
25 | | - """Whether to rerank results and optional reranking configuration""" |
| 44 | + """Whether to rerank results and optional reranking configuration. |
| 45 | +
|
| 46 | + Ignored when agentic is enabled (the agent handles ranking). |
| 47 | + """ |
| 48 | + |
| 49 | + agentic: Optional[Agentic] |
| 50 | + """ |
| 51 | + Whether to use agentic multi-query search with automatic query decomposition and |
| 52 | + ranking. When enabled, rewrite_query and rerank options are ignored. |
| 53 | + """ |
26 | 54 |
|
27 | 55 | return_metadata: bool |
28 | 56 | """Whether to return file metadata""" |
|
0 commit comments