chatgpt-retrieval-plugin
chatgpt-retrieval-plugin copied to clipboard
Calling /upsert-file should be setting source as type 'file'
I believe /upsert-file should be setting the source to 'file' type. Currently it is left as null and hence results in an error during query as follows:
Error: 1 validation error for DocumentChunkWithScore metadata -> source value is not a valid enumeration member; permitted: 'email', 'file', 'chat' (type=type_error.enum; enum_values=[<Source.email: 'email'>, <Source.file: 'file'>, <Source.chat: 'chat'>])
Backend datastore is redis-stack-server
You will also need to use a Filter and specify the source to search when querying with Redis else the same error occurs.
{
"queries": [
{
"query": "string,
"filter": {
"source": "file"
},
"top_k": 3
}
]
}
I think https://github.com/openai/chatgpt-retrieval-plugin/issues/37#issuecomment-1483635163 is better solution.
While I tested using qdrant sample document (examples/docker/qdrant/documents.json), they don't have source field and server occurs the same error.
I think #37 (comment) is better solution. While I tested using qdrant sample document (
examples/docker/qdrant/documents.json), they don't havesourcefield and server occurs the same error.
Hi - The solution you are referring to is a workaround that needs to be done at each datastore implementation level. This one addresses this at the root cause - since this will happen for all datastore types.
This worked for me.
I reported same issue, and it worked for me.
Thank you all! Resolved here: https://github.com/openai/chatgpt-retrieval-plugin/commit/e07ffedb3f0365c3839b3681cc3781174634f471