I have this very simple code:
vector_store=RedisVectorStore(
schema=custom_schema,
redis_url=f"redis://{REDIS_HOST}:{REDIS_PORT}",
with schema referencing
custom_schema = IndexSchema.from_dict(
{
"index": {
"name": "chevy-colorado",
"prefix": "pdf:chunk",
"key_separator": ":"
},
# customize fields that are indexed
"fields": [
# required fields for llamaindex
{"type": "tag", "name": "id"},
{"type": "tag", "name": "doc_id"},
{"type": "text", "name": "text"},
# custom vector field for cohere embeddings
{
"type": "vector",
"name": "vector",
"attrs": {
"dims": 1024,
"algorithm": "hnsw",
"distance_metric": "cosine",
},
},
],
}
)
simply trying to emulate a written up solution, but when I run the code locally I receive this error:
vector_store=RedisVectorStore(
^^^^^^^^^^^^^^^^^
TypeError: RedisVectorStore.init() missing 1 required positional argument: 'index_name'
Seems like this is a versioning issue, but I can't be sure. Thoughts?
Add a reply
Sign up and join the conversation on Discord