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

Closed
opened 2026-02-21 18:07:53 -05:00 by yindo · 1 comment
Owner

Originally created by @LeoQuote on GitHub (Jul 24, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • 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
Originally created by @LeoQuote on GitHub (Jul 24, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [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 ```
yindo added the 🐞 bug label 2026-02-21 18:07:53 -05:00
yindo closed this issue 2026-02-21 18:07:53 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 24, 2024):

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] commented on GitHub (Jul 24, 2024): <!-- Answer --> 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: ```plaintext # 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 <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/.env.example)</sup><sup>[[2]](https://github.com/langgenius/dify/blob/main/docker/.env.example)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#4756