dify icon indicating copy to clipboard operation
dify copied to clipboard

raise validation error for TiDBVectorConfig Value error when using other vector db

Open LeoQuote opened this issue 1 year ago • 1 comments

Self Checks

  • [X] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [X] I have searched for existing issues search for existing issues, including closed ones.
  • [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [X] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [X] Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.15

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

run dify with VECTOR_STORE and set the related settings:

VECTOR_STORE: tencent
TENCENT_VECTOR_DB_URL: http://10.1.10.34
...

import document in knowledge base ui.

✔️ Expected Behavior

document imported

❌ Actual Behavior

1 validation error for TiDBVectorConfig Value error, config TIDB_VECTOR_HOST is required [type=value_error, input_value={'host': None, 'port': 40...ame': 'langgenius/dify'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.8/v/value_error

LeoQuote avatar Jul 24 '24 06:07 LeoQuote

To resolve the validation error requiring TIDB_VECTOR_HOST when trying to use the Tencent vector database with Dify version 0.6.15, ensure that the configuration for the Tencent vector database is correctly set in your .env file. Here is an example configuration:

# Vector database configuration
VECTOR_STORE=tencent

# Tencent vector database configuration
TENCENT_VECTOR_DB_URL=http://10.1.10.34
TENCENT_VECTOR_DB_API_KEY=dify
TENCENT_VECTOR_DB_TIMEOUT=30
TENCENT_VECTOR_DB_USERNAME=dify
TENCENT_VECTOR_DB_PASSWORD=dify
TENCENT_VECTOR_DB_SHARD=1
TENCENT_VECTOR_DB_REPLICAS=2

Make sure to set the VECTOR_STORE variable to tencent and provide the necessary configuration parameters for the Tencent vector database. This should bypass the need for TIDB_VECTOR_HOST and other TiDB-specific configurations [1][2].

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar Jul 24 '24 06:07 dosubot[bot]