chatgpt-retrieval-plugin icon indicating copy to clipboard operation
chatgpt-retrieval-plugin copied to clipboard

Bug in providers.redis_datastore.py causing hardcoded prefix of "doc" in Redis key

Open kechan opened this issue 2 years ago • 0 comments

I think the prefix for redis keys are being hardcoded with "doc":

` def _redis_key(document_id: str, chunk_id: str) -> str: """ Create the JSON key for document chunks in Redis.

    Args:
        document_id (str): Document Identifier
        chunk_id (str): Chunk Identifier

    Returns:
        str: JSON key string.
    """
    return f"doc:{document_id}:chunk:{chunk_id}"

`

Should this be?

return f"{REDIS_DOC_PREFIX}:{document_id}:chunk:{chunk_id}"

if REDIS_DOC_PREFIX is what I think it is?

kechan avatar Jul 08 '23 17:07 kechan