langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
45.3k stars 6.36k forks source link

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

Closed LeoQuote closed 5 days ago

LeoQuote commented 1 month ago

Self Checks

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
dosubot[bot] commented 1 month ago

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.