now.executor.gateway.bff.app.v1.models.search module#
- class now.executor.gateway.bff.app.v1.models.search.IndexRequestModel(**data)[source]#
Bases:
BaseRequestModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- data: List[Tuple[Dict[str, ModalityModel], Dict[str, Any]]]#
- class now.executor.gateway.bff.app.v1.models.search.SearchRequestModel(**data)[source]#
Bases:
BaseRequestModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- limit: int#
- filters: Optional[Dict[str, Union[List, Dict[str, Union[int, float]]]]]#
- query: List[Dict]#
- create_temp_link: bool#
- score_calculation: List[List]#
- get_score_breakdown: bool#
- class now.executor.gateway.bff.app.v1.models.search.SearchResponseModel(id, scores={}, tags={}, fields={})[source]#
Bases:
BaseModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- id: str#
- scores: Optional[Dict[str, _NamedScore]]#
- fields: Dict[str, ModalityModel]#
- tags: Optional[Dict[str, Union[str, bool, float, None, List[Optional[Union[str, bool, float]]], Dict[str, Optional[Union[str, bool, float]]]]]]#
- to_html(disable_to_datauri=False)[source]#
Converts the SearchResponseModel to HTML. This is used to display the a single multi-modal result as HTML.
- Parameters
disable_to_datauri (
bool
) – If True, the image is not converted to datauri.- Return type
str
- class now.executor.gateway.bff.app.v1.models.search.SuggestionRequestModel(**data)[source]#
Bases:
BaseRequestModel
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- text: Optional[str]#