langchain.vectorstores.redis.schema.RedisModel¶
class langchain.vectorstores.redis.schema.RedisModel[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.
param content_key: str = 'content'¶
param content_vector_key: str = 'content_vector'¶
param extra: Optional[List[langchain.vectorstores.redis.schema.RedisField]] = None¶
param numeric: Optional[List[langchain.vectorstores.redis.schema.NumericFieldSchema]] = None¶
param tag: Optional[List[langchain.vectorstores.redis.schema.TagFieldSchema]] = None¶
param text: List[langchain.vectorstores.redis.schema.TextFieldSchema] = [TextFieldSchema(name='content', weight=1, no_stem=False, phonetic_matcher=None, withsuffixtrie=False, no_index=False, sortable=False)]¶
param vector: Optional[List[Union[langchain.vectorstores.redis.schema.FlatVectorField, langchain.vectorstores.redis.schema.HNSWVectorField]]] = None¶
add_content_field() → None[source]¶
add_vector_field(vector_field: Dict[str, Any]) → None[source]¶
as_dict() → Dict[str, List[Any]][source]¶
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values