SemanticSearchSchema
Schema for semantic search
Subclass of Executable. Type of Executable[SemanticSearchSchemaInput, SemanticSearchSchemaOutput]
Module: implementation.schemas
Methods and properties
Main methods and properties
__init__
Arguments:
dataset (Optional[List[str]], optional): Dataset for search. Defaults to None.
encoder (Optional[TransformersTextEmbedding[Any, Any]], optional): Encoder for embeddings creation. If equals to None, default encoder will be used. Defaults to None.
input_class (Type[SemanticSearchSchemaInput], optional): Class for input validation. Defaults to SemanticSearchSchemaInput.
output_class (Type[SemanticSearchSchemaOutput], optional): Class for output validation. Defaults to SemanticSearchSchemaOutput.
name (Optional[str], optional): Name for identification. If equals to None, class name will be used. Defaults to None.
SemanticSearchSchemaInput
Subclass of IOModel.
__init__
Arguments:
query (List[str])
results_count (int)
SemanticSearchSchemaOutput
Subclass of IOModel.
__init__
Arguments:
search_results (Dict[str, Any]): Expected keys:
"distances" (List[float]): List of distances;
"indexes" (List[Any]): Indexes of indexed data;
"texts" (List[str]): Texts of results;
Last updated