RedisModel#

class langchain_community.vectorstores.redis.schema.RedisModel[source]#

Bases: BaseModel

Schema for Redis index.

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.

param content_key: str = 'content'#
param content_vector_key: str = 'content_vector'#
param extra: List[RedisField] | None = None#
param numeric: List[NumericFieldSchema] | None = None#
param tag: List[TagFieldSchema] | None = None#
param text: List[TextFieldSchema] = [TextFieldSchema(name='content', weight=1, no_stem=False, phonetic_matcher=None, withsuffixtrie=False, no_index=False, sortable=False)]#
param vector: List[FlatVectorField | HNSWVectorField] | None = None#
add_content_field() None[source]#
Return type:

None

add_vector_field(vector_field: Dict[str, Any]) None[source]#
Parameters:

vector_field (Dict[str, Any]) –

Return type:

None

as_dict() Dict[str, List[Any]][source]#
Return type:

Dict[str, List[Any]]

get_fields() List[RedisField][source]#
Return type:

List[RedisField]

property content_vector: FlatVectorField | HNSWVectorField#
property is_empty: bool#
property metadata_keys: List[str]#
property vector_dtype: dtype#