RedisVectorStoreConfigLoader

org.llm4s.config.RedisVectorStoreConfigLoader

Loads the llm4s.vectorstore.redis block into a org.llm4s.vectorstore.redis.RedisConfig.

llm4s-vectorstore-redis's reference.conf binds REDIS_HOST, REDIS_PORT, REDIS_TLS, REDIS_USERNAME, REDIS_PASSWORD and REDIS_VECTOR_INDEX. Every setting has a default, so with none set this is a local server without authentication. Blank strings (an unset variable bound through application.conf) count as unset.

llm4s.vectorstore.redis {
 host           = "redis.example.com"
 tls            = true
 password       = ${?REDIS_PASSWORD}
 index          = "docs"
 distanceMetric = COSINE
 dimensions     = 1536
}
for
 config <- RedisVectorStoreConfigLoader.default()
 store  <- RedisVectorStore(config)
yield store

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

load against the current environment: system properties, application.conf and every reference.conf.

load against the current environment: system properties, application.conf and every reference.conf.

Attributes

def load(source: ConfigSource): Result[RedisConfig]

Reads llm4s.vectorstore.redis from source and checks the result.

Reads llm4s.vectorstore.redis from source and checks the result.

Attributes

Returns

the config, or a org.llm4s.error.ConfigurationError for an unreadable block, an unknown algorithm or distance metric, or a setting org.llm4s.vectorstore.redis.RedisConfig#validate refuses