from_yaml(
cls,
schema_path: str,
**kwargs: Any = {}
) -> RedisConfig| Name | Type | Description |
|---|---|---|
schema_path* | str | Path to the YAML file containing the index schema definition. |
**kwargs | Any | Default: {}Additional keyword arguments to override or supplement the schema-derived settings. Common kwargs include:
|
Create a RedisConfig object from a YAML file containing the index schema.
This class method creates a RedisConfig instance using a YAML file that defines the structure of the Redis index.
Example:
.. code-block:: python
from langchain_redis import RedisConfig
config = RedisConfig.from_yaml( schema_path="path/to/index_schema.yaml", redis_url="redis://localhost:6379" )
print(config.index_name) # Output: Name defined in YAML print(config.storage_type) # Output: Storage type defined in YAML
Note: