BoundSearchRequest
yosoi.search.BoundSearchRequest
class BoundSearchRequest:
A request with a serialized snapshot of a complete policy declaration.
Attributes: request: Retained query request. Changing the caller policy later does not affect this binding.
Source: python/yosoi/search.py:688
Members below are declared on this class. Inherited Pydantic methods and generated constructor signatures are not expanded.
Methods
Section titled “Methods”def __init__(self, request: SearchRequest, policy: Policy) -> None:
Retain the query request and serialize the policy without provider I/O.
Args: request: Authored query request to retain. policy: Complete declaration to snapshot for subsequent checks and sends.
Source: python/yosoi/search.py:696
@property
def id(self) -> str:
Return the identity of the retained query request.
Source: python/yosoi/search.py:707
@property
def query(self) -> str:
Return the original authored query; it can contain user-sensitive text.
Source: python/yosoi/search.py:712
policy
Section titled “policy”@property
def policy(self) -> Policy:
Return a policy copy whose edits do not affect this binding.
Source: python/yosoi/search.py:717
def check(self) -> None:
Validate against the bound policy snapshot without sending provider requests.
Raises: SearchError: Provider selection, policy resolution, or execution setup is invalid.
Source: python/yosoi/search.py:721
async def send(self, *, cancellation: CancellationToken | None=None) -> SearchResponse:
Run providers selected by the bound policy snapshot.
Args: cancellation: Optional cooperative token shared with other operations. Observed cancellation retains completed results and unstarted slots.
Returns: Typed response in authored provider order, including failures and partial results. Inspect termination separately from each provider outcome.
Raises: SearchError: Policy resolution or execution setup fails before a response. pydantic.ValidationError: Native response data cannot form a typed result.