Find answers from the community

Updated 2 months ago

I have this very simple code:

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?
B
L
8 comments
all the llama_index docs do not require this field, that's why I think it might be a versioning issue
What version do you have for the redis vector store?

pip show llama-index-vector-stores-redis
you can update with pip install -U llama-index-vector-stores-redis
The source code does not mention an index_name argument in the constructor, so your installed version might be out of date
Name: llama-index-vector-stores-redis
Version: 0.1.2
latest is v0.2.0 I think
I would update to that
Thanks, that did the trick!
Add a reply
Sign up and join the conversation on Discord