-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
When I started running, I encountered the following problem,May I ask if I need to make any modifications
2025-03-20 15:45:11 I0320 07:45:11.048 8 wren-ai-service:405] Using Qdrant Document Store with Embedding Model Dimension: 1024 2025-03-20 15:45:11 ERROR: Traceback (most recent call last): 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 72, in map_httpcore_exceptions 2025-03-20 15:45:11 yield 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 236, in handle_request 2025-03-20 15:45:11 resp = self._pool.handle_request(req) 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 256, in handle_request 2025-03-20 15:45:11 raise exc from None 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py", line 236, in handle_request 2025-03-20 15:45:11 response = connection.handle_request( 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 101, in handle_request 2025-03-20 15:45:11 raise exc 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 78, in handle_request 2025-03-20 15:45:11 stream = self._connect(request) 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/httpcore/_sync/connection.py", line 124, in _connect 2025-03-20 15:45:11 stream = self._network_backend.connect_tcp(**kwargs) 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/httpcore/_backends/sync.py", line 207, in connect_tcp 2025-03-20 15:45:11 with map_exceptions(exc_map): 2025-03-20 15:45:11 File "/usr/local/lib/python3.12/contextlib.py", line 155, in __exit__ 2025-03-20 15:45:11 self.gen.throw(value) 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions 2025-03-20 15:45:11 raise to_exc(exc) from exc 2025-03-20 15:45:11 httpcore.ConnectError: [Errno 111] Connection refused 2025-03-20 15:45:11 2025-03-20 15:45:11 The above exception was the direct cause of the following exception: 2025-03-20 15:45:11 2025-03-20 15:45:11 Traceback (most recent call last): 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/qdrant_client/http/api_client.py", line 106, in send_inner 2025-03-20 15:45:11 response = self._client.send(request) 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/httpx/_client.py", line 926, in send 2025-03-20 15:45:11 response = self._send_handling_auth( 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/httpx/_client.py", line 954, in _send_handling_auth 2025-03-20 15:45:11 response = self._send_handling_redirects( 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/httpx/_client.py", line 991, in _send_handling_redirects 2025-03-20 15:45:11 response = self._send_single_request(request) 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/httpx/_client.py", line 1027, in _send_single_request 2025-03-20 15:45:11 response = transport.handle_request(request) 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 235, in handle_request 2025-03-20 15:45:11 with map_httpcore_exceptions(): 2025-03-20 15:45:11 File "/usr/local/lib/python3.12/contextlib.py", line 155, in __exit__ 2025-03-20 15:45:11 self.gen.throw(value) 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/httpx/_transports/default.py", line 89, in map_httpcore_exceptions 2025-03-20 15:45:11 raise mapped_exc(message) from exc 2025-03-20 15:45:11 httpx.ConnectError: [Errno 111] Connection refused 2025-03-20 15:45:11 2025-03-20 15:45:11 During handling of the above exception, another exception occurred: 2025-03-20 15:45:11 2025-03-20 15:45:11 Traceback (most recent call last): 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/starlette/routing.py", line 692, in lifespan 2025-03-20 15:45:11 async with self.lifespan_context(app) as maybe_state: 2025-03-20 15:45:11 File "/usr/local/lib/python3.12/contextlib.py", line 204, in __aenter__ 2025-03-20 15:45:11 return await anext(self.gen) 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 133, in merged_lifespan 2025-03-20 15:45:11 async with original_context(app) as maybe_original_state: 2025-03-20 15:45:11 File "/usr/local/lib/python3.12/contextlib.py", line 204, in __aenter__ 2025-03-20 15:45:11 return await anext(self.gen) 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/fastapi/routing.py", line 133, in merged_lifespan 2025-03-20 15:45:11 async with original_context(app) as maybe_original_state: 2025-03-20 15:45:11 File "/usr/local/lib/python3.12/contextlib.py", line 204, in __aenter__ 2025-03-20 15:45:11 return await anext(self.gen) 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/src/__main__.py", line 31, in lifespan 2025-03-20 15:45:11 pipe_components = generate_components(settings.components) 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/src/providers/__init__.py", line 336, in generate_components 2025-03-20 15:45:11 identifier: provider_factory(config) 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/src/providers/__init__.py", line 16, in provider_factory 2025-03-20 15:45:11 return loader.get_provider(config.get("provider"))(**config) 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/src/providers/document_store/qdrant.py", line 392, in __init__ 2025-03-20 15:45:11 self._reset_document_store(recreate_index) 2025-03-20 15:45:11 File "/src/providers/document_store/qdrant.py", line 395, in _reset_document_store 2025-03-20 15:45:11 self.get_store(recreate_index=recreate_index) 2025-03-20 15:45:11 File "/src/providers/document_store/qdrant.py", line 409, in get_store 2025-03-20 15:45:11 return AsyncQdrantDocumentStore( 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/src/providers/document_store/qdrant.py", line 161, in __init__ 2025-03-20 15:45:11 self.client.create_payload_index( 2025-03-20 15:45:11 ^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/haystack_integrations/document_stores/qdrant/document_store.py", line 280, in client 2025-03-20 15:45:11 self._set_up_collection( 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/haystack_integrations/document_stores/qdrant/document_store.py", line 860, in _set_up_collection 2025-03-20 15:45:11 self.recreate_collection( 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/haystack_integrations/document_stores/qdrant/document_store.py", line 965, in recreate_collection 2025-03-20 15:45:11 if self.client.collection_exists(collection_name): 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/qdrant_client/qdrant_client.py", line 1942, in collection_exists 2025-03-20 15:45:11 return self._client.collection_exists(collection_name=collection_name, **kwargs) 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/qdrant_client/qdrant_remote.py", line 2439, in collection_exists 2025-03-20 15:45:11 result: Optional[models.CollectionExistence] = self.http.collections_api.collection_exists( 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/qdrant_client/http/api/collections_api.py", line 1157, in collection_exists 2025-03-20 15:45:11 return self._build_for_collection_exists( 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/qdrant_client/http/api/collections_api.py", line 87, in _build_for_collection_exists 2025-03-20 15:45:11 return self.api_client.request( 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/qdrant_client/http/api_client.py", line 79, in request 2025-03-20 15:45:11 return self.send(request, type_) 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/qdrant_client/http/api_client.py", line 96, in send 2025-03-20 15:45:11 response = self.middleware(request, self.send_inner) 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/qdrant_client/http/api_client.py", line 205, in __call__ 2025-03-20 15:45:11 return call_next(request) 2025-03-20 15:45:11 ^^^^^^^^^^^^^^^^^^ 2025-03-20 15:45:11 File "/app/.venv/lib/python3.12/site-packages/qdrant_client/http/api_client.py", line 108, in send_inner 2025-03-20 15:45:11 raise ResponseHandlingException(e) 2025-03-20 15:45:11 qdrant_client.http.exceptions.ResponseHandlingException: [Errno 111] Connection refused 2025-03-20 15:45:11 2025-03-20 15:45:11 ERROR: Application startup failed. Exiting. 2025-03-20 15:46:05 Timeout: wren-ai-service did not start within 60 seconds 2025-03-20 15:46:05 Waiting for qdrant to start... 2025-03-20 15:46:05 qdrant has started. 2025-03-20 15:46:05 Waiting for wren-ai-service to start... 2025-03-20 15:46:06 Warning: Unknown configuration key 'historical_question_retrieval_similarity_threshold' in YAML file. 2025-03-20 15:46:06 Warning: Unknown configuration key 'instructions_similarity_threshold' in YAML file. 2025-03-20 15:46:06 Warning: Unknown configuration key 'instructions_top_k' in YAML file.
This is my conf.yml
type: llm
provider: litellm_llm
models:
- api_base: https://api.deepseek.com/v1
model: deepseek/deepseek-chat
timeout: 120
kwargs:
n: 1
temperature: 0
response_format:
type: text
type: embedder
provider: litellm_embedder
models:
define OPENAI_API_KEY=<api_key> in ~/.wrenai/.env if you are using openai embedding model
please refer to LiteLLM documentation for more details: https://docs.litellm.ai/docs/providers
- model: deepseek/deepseek-chat # put your embedding model name here, if it is not openai embedding model, should be /<model_name>
alias: default
api_base: https://api.deepseek.com/v1 # change this according to your embedding model
api_key_name: EMBEDDER_OLLAMA_API_KEY
timeout: 120
type: engine
provider: wren_ui
endpoint: http://localhost:3000
type: engine
provider: wren_ibis
endpoint: http://localhost:8000
type: document_store
provider: qdrant
location: http://localhost:6333
embedding_model_dim: 1024 # put your embedding model dimension here
timeout: 120
recreate_index: true
please change the llm and embedder names to the ones you want to use
the format of llm and embedder should be .<model_name> such as litellm_llm.gpt-4o-2024-08-06
the pipes may be not the latest version, please refer to the latest version: https://raw.githubusercontent.com/canner/WrenAI/<WRENAI_VERSION_NUMBER>/docker/config.example.yaml
type: pipeline
pipes:
- name: db_schema_indexing
embedder: litellm_embedder.deepseek/deepseek-chat
document_store: qdrant - name: historical_question_indexing
embedder: litellm_embedder.deepseek/deepseek-chat
document_store: qdrant - name: table_description_indexing
embedder: litellm_embedder.deepseek/deepseek-chat
document_store: qdrant - name: db_schema_retrieval
llm: litellm_llm.deepseek/deepseek-chat
embedder: litellm_embedder.deepseek/deepseek-chat
document_store: qdrant - name: historical_question_retrieval
embedder: litellm_embedder.deepseek/deepseek-chat
document_store: qdrant - name: sql_generation
llm: litellm_llm.deepseek/deepseek-chat
engine: wren_ui - name: sql_correction
llm: litellm_llm.deepseek/deepseek-chat
engine: wren_ui - name: followup_sql_generation
llm: litellm_llm.deepseek/deepseek-chat
engine: wren_ui - name: sql_summary
llm: litellm_llm.deepseek/deepseek-chat - name: sql_answer
llm: litellm_llm.deepseek/deepseek-chat
engine: wren_ui - name: sql_breakdown
llm: litellm_llm.deepseek/deepseek-chat
engine: wren_ui - name: sql_expansion
llm: litellm_llm.deepseek/deepseek-chat
engine: wren_ui - name: semantics_description
llm: litellm_llm.deepseek/deepseek-chat - name: relationship_recommendation
llm: litellm_llm.deepseek/deepseek-chat
engine: wren_ui - name: question_recommendation
llm: litellm_llm.deepseek/deepseek-chat - name: question_recommendation_db_schema_retrieval
llm: litellm_llm.deepseek/deepseek-chat
embedder: litellm_embedder.deepseek/deepseek-chat
document_store: qdrant - name: question_recommendation_sql_generation
llm: litellm_llm.deepseek/deepseek-chat
engine: wren_ui - name: chart_generation
llm: litellm_llm.deepseek/deepseek-chat - name: chart_adjustment
llm: litellm_llm.deepseek/deepseek-chat - name: intent_classification
llm: litellm_llm.deepseek/deepseek-chat
embedder: litellm_embedder.deepseek/deepseek-chat
document_store: qdrant - name: data_assistance
llm: litellm_llm.deepseek/deepseek-chat - name: sql_pairs_indexing
document_store: qdrant
embedder: litellm_embedder.deepseek/deepseek-chat - name: sql_pairs_retrieval
document_store: qdrant
embedder: litellm_embedder.deepseek/deepseek-chat
llm: litellm_llm.deepseek/deepseek-chat - name: preprocess_sql_data
llm: litellm_llm.deepseek/deepseek-chat - name: sql_executor
engine: wren_ui - name: sql_question_generation
llm: litellm_llm.deepseek/deepseek-chat - name: sql_generation_reasoning
llm: litellm_llm.deepseek/deepseek-chat - name: followup_sql_generation_reasoning
llm: litellm_llm.deepseek/deepseek-chat - name: sql_regeneration
llm: litellm_llm.deepseek/deepseek-chat
engine: wren_ui - name: instructions_indexing
embedder: litellm_embedder.deepseek/deepseek-chat
document_store: qdrant - name: instructions_retrieval
embedder: litellm_embedder.deepseek/deepseek-chat
document_store: qdrant - name: sql_functions_retrieval
engine: wren_ibis
document_store: qdrant - name: project_meta_indexing
document_store: qdrant - name: sql_pairs_deletion
document_store: qdrant
embedder: litellm_embedder.deepseek/deepseek-chat
settings:
column_indexing_batch_size: 50
table_retrieval_size: 10
table_column_retrieval_size: 100
allow_using_db_schemas_without_pruning: false # if you want to use db schemas without pruning, set this to true. It will be faster
allow_intent_classification: true
allow_sql_generation_reasoning: true
query_cache_maxsize: 1000
query_cache_ttl: 3600
langfuse_host: https://cloud.langfuse.com
langfuse_enable: true
logging_level: DEBUG
development: true
historical_question_retrieval_similarity_threshold: 0.9
sql_pairs_similarity_threshold: 0.7
sql_pairs_retrieval_max_size: 10
instructions_similarity_threshold: 0.7
instructions_top_k: 10
This is my env ,I only I only filled it out DeepSeek key
COMPOSE_PROJECT_NAME=wrenai
PLATFORM=linux/amd64
PROJECT_DIR=.
service port
WREN_ENGINE_PORT=8080
WREN_ENGINE_SQL_PORT=7432
WREN_AI_SERVICE_PORT=5555
WREN_UI_PORT=3000
IBIS_SERVER_PORT=8000
WREN_UI_ENDPOINT=http://wren-ui:${WREN_UI_PORT}
ai service settings
QDRANT_HOST=qdrant
SHOULD_FORCE_DEPLOY=1
vendor keys
LLM_OPENAI_API_KEY=
EMBEDDER_OPENAI_API_KEY=
LLM_AZURE_OPENAI_API_KEY=
EMBEDDER_AZURE_OPENAI_API_KEY=
QDRANT_API_KEY=
DEEPSEEK_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
version
CHANGE THIS TO THE LATEST VERSION
WREN_PRODUCT_VERSION=0.15.4
WREN_ENGINE_VERSION=0.14.3
WREN_AI_SERVICE_VERSION=0.15.18
IBIS_SERVER_VERSION=0.14.3
WREN_UI_VERSION=0.20.2
WREN_BOOTSTRAP_VERSION=0.1.5
user id (uuid v4)
USER_UUID=
for other services
POSTHOG_API_KEY=phc_nhF32aj4xHXOZb0oqr2cn4Oy9uiWzz6CCP4KZmRq9aE
POSTHOG_HOST=https://app.posthog.com
TELEMETRY_ENABLED=true
this is for telemetry to know the model, i think ai-service might be able to provide a endpoint to get the information
GENERATION_MODEL=gpt-4o-mini
LANGFUSE_SECRET_KEY=
LANGFUSE_PUBLIC_KEY=
the port exposes to the host
OPTIONAL: change the port if you have a conflict
HOST_PORT=3000
AI_SERVICE_FORWARD_PORT=5555
Wren UI
EXPERIMENTAL_ENGINE_RUST_VERSION=false
EMBEDDER_OLLAMA_API_KEY=123456