Closed mengdahuang closed 3 months ago
The 'KeyError: vector' error when switching from 'vector retrieval' to 'mixed retrieval' in Dify version 0.6.16 is likely due to a missing or misconfigured setting related to the vector search component within the mixed retrieval configuration. The mixed retrieval method requires both full-text and vector search configurations. If the vector search settings are not properly defined or missing, it can lead to this error [1].
To resolve this issue, ensure that the vector search settings are correctly configured. Here are the specific configurations required for the vector search component within the mixed retrieval method:
weaviate
, qdrant
, milvus
, relyt
, pgvector
, chroma
, opensearch
, tidb_vector
, oracle
, and tencent
. Depending on the selected vector store, additional configurations such as endpoint URLs, API keys, and other specific settings are required.Example configuration for Weaviate:
VECTOR_STORE=weaviate
WEAVIATE_ENDPOINT=http://weaviate:8080
WEAVIATE_API_KEY=WVF5YThaHlkYwhGUSmCRgsX3tD5ngdN8pkih
Example configuration for Qdrant:
VECTOR_STORE=qdrant
QDRANT_URL=http://qdrant:6333
QDRANT_API_KEY=difyai123456
QDRANT_CLIENT_TIMEOUT=20
QDRANT_GRPC_ENABLED=false
QDRANT_GRPC_PORT=6334
Additionally, ensure that the rerank model is selected and valid. If the rerank model is not selected, the system will notify you to configure it before saving the settings [1][2].
By verifying and correctly setting these configurations, you should be able to resolve the 'KeyError: vector' issue when using the mixed retrieval method.
To continue talking to Dosu, mention @dosu.
Link #7012
@crazywoola Thank you for the reply. My Docker was pulled to the latest version yesterday evening. May I ask if I only need to do a docker pull again to fix this problem?
Link #7012
@crazywoola Thank you for the reply. My Docker was pulled to the latest version yesterday evening. May I ask if I only need to do a docker pull again to fix this problem?
Not sure if this issue is resolved by this commit. I need to check it with @JohnJyong .
Do a docker pull won't fix this problem, because we haven't release a new version, I think this should remains in latest docker images.
BTW, what vector db you are using? This might be a issue related to vector db. I think you can change to another one in the mean time.
BTW, what vector db you are using? This might be a issue related to vector db. I think you can change to another one in the mean time.
Currently, I am using "VECTOR_STORE=weaviate " (Default value)
Link #7012
@crazywoola Thank you for the reply. My Docker was pulled to the latest version yesterday evening. May I ask if I only need to do a docker pull again to fix this problem?
Not sure if this issue is resolved by this commit. I need to check it with @JohnJyong .
Do a docker pull won't fix this problem, because we haven't release a new version, I think this should remains in latest docker images.
All right, thanks for your kindly help.
We have fixed this in #7051 , please wait for our new releases.
Self Checks
Dify version
0.6.16
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Dear Dify Support Team,
After I upgraded to the latest version and changed the knowledge base from 'vector retrieval' to 'mixed retrieval', some questions returned errors, with the web interface indicating 'vector'. However, when I switched it back to 'vector retrieval', everything returned to normal.
PS:Not all questions return the 'vector' error when using 'mixed retrieval'; some work normally. Please see the detailed logs below.
error log
Thanks!
✔️ Expected Behavior
No response
❌ Actual Behavior
No response