chat_id = "test"
docstore = RedisDocumentStore.from_redis_client(
redis_client=redis_client,
namespace="Docstore",
)
index_store = RedisIndexStore.from_redis_client(
redis_client=redis_client,
namespace="IndexStore"
)
vector_store = RedisVectorStore(
redis_url=f"redis://:{REDIS_DB_PASSWORD}@{REDIS_DB_HOST}:{REDIS_DB_PORT}/0",
index_name="VectorStore" + chat_id,
index_prefix=chat_id
)
storage_context=StorageContext.from_defaults(
docstore=docstore, index_store=index_store, vector_store=vector_store
)
index = VectorStoreIndex(
nodes=[],
storage_context=storage_context,
service_context=service_context)
print(index.as_chat_engine(ChatMode.CONTEXT).chat("hola"))
The code above fails. With the following error:
raise response
redis.exceptions.ResponseError: VectorStoretest: no such index