-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Describe the bug
使用qwen3 llm和 qwen text-embedding-v3时,发生的运行时异常,在提问时候点击send后,客户端显示“Failed to create asking task.”
config.yaml
type: llm
provider: litellm_llm
models:
# 通义千问Qwen-Max - 禁用思考模式
- api_base: https://dashscope.aliyuncs.com/compatible-mode/v1
model: dashscope/qwen-plus
alias: default
timeout: 900
kwargs:
n: 1
temperature: 0.1
top_p: 0.8
#allowed_openai_params: ["extra_headers"]
#extra_headers:
#X-DashScope-Async: "false"
# 通义千问Qwen-Plus - 快速模式
- api_base: https://dashscope.aliyuncs.com/compatible-mode/v1
model: dashscope/qwen-plus
alias: qwen-fast
timeout: 900
kwargs:
n: 1
temperature: 0.1
top_p: 0.8
#allowed_openai_params: ["extra_headers"]
#extra_headers:
#X-DashScope-Async: "false"
# 通义千问Qwen-Max - 启用思考模式处理复杂任务
- api_base: https://dashscope.aliyuncs.com/compatible-mode/v1
model: dashscope/qwen-plus
alias: qwen-thinking
timeout: 1200 # 思考模式需要更长超时时间
kwargs:
n: 1
temperature: 0.3
top_p: 0.9
#allowed_openai_params: ["extra_headers"]
#extra_headers:
#X-DashScope-Async: "false"
# 通义千问Qwen-Max - JSON响应模式
- api_base: https://dashscope.aliyuncs.com/compatible-mode/v1
model: dashscope/qwen-plus
alias: qwen-json
timeout: 900
kwargs:
n: 1
temperature: 0.05
top_p: 0.7
response_format:
type: json_object
#allowed_openai_params: ["extra_headers"]
#extra_headers:
#X-DashScope-Async: "false"
---
type: embedder
provider: litellm_embedder
models:
- model: dashscope/text-embedding-v3
alias: default
api_base: https://dashscope.aliyuncs.com/compatible-mode/v1
timeout: 120
kwargs:
#allowed_openai_params: ["extra_headers"]
#extra_headers:
#X-DashScope-Async: "false"
---
type: engine
provider: wren_ui
endpoint: http://wren-ui:3000
---
type: engine
provider: wren_ibis
endpoint: http://ibis-server:8000
---
type: document_store
provider: qdrant
location: http://qdrant:6333
embedding_model_dim: 1024
timeout: 120
recreate_index: true
---
# 使用阿里云模型替换原有模型
# 格式为<provider>.<model_alias>
type: pipeline
pipes:
- name: db_schema_indexing
embedder: litellm_embedder.default
document_store: qdrant
- name: historical_question_indexing
embedder: litellm_embedder.default
document_store: qdrant
- name: table_description_indexing
embedder: litellm_embedder.default
document_store: qdrant
- name: db_schema_retrieval
llm: litellm_llm.default
embedder: litellm_embedder.default
document_store: qdrant
- name: historical_question_retrieval
embedder: litellm_embedder.default
document_store: qdrant
- name: sql_generation
llm: litellm_llm.default
engine: wren_ui
document_store: qdrant
- name: sql_correction
llm: litellm_llm.default
engine: wren_ui
document_store: qdrant
- name: followup_sql_generation
llm: litellm_llm.default
engine: wren_ui
document_store: qdrant
- name: sql_answer
llm: litellm_llm.qwen-fast
- name: semantics_description
llm: litellm_llm.default
- name: relationship_recommendation
llm: litellm_llm.default
engine: wren_ui
- name: question_recommendation
llm: litellm_llm.default
- name: question_recommendation_db_schema_retrieval
llm: litellm_llm.default
embedder: litellm_embedder.default
document_store: qdrant
- name: question_recommendation_sql_generation
llm: litellm_llm.default
engine: wren_ui
document_store: qdrant
- name: chart_generation
llm: litellm_llm.default
- name: chart_adjustment
llm: litellm_llm.default
- name: intent_classification
llm: litellm_llm.default
embedder: litellm_embedder.default
document_store: qdrant
- name: misleading_assistance
llm: litellm_llm.default
- name: data_assistance
llm: litellm_llm.qwen-fast
- name: sql_pairs_indexing
document_store: qdrant
embedder: litellm_embedder.default
- name: sql_pairs_retrieval
document_store: qdrant
embedder: litellm_embedder.default
llm: litellm_llm.default
- name: preprocess_sql_data
llm: litellm_llm.default
- name: sql_executor
engine: wren_ui
- name: user_guide_assistance
llm: litellm_llm.default
- name: sql_question_generation
llm: litellm_llm.default
- name: sql_generation_reasoning
llm: litellm_llm.qwen-thinking
- name: followup_sql_generation_reasoning
llm: litellm_llm.qwen-thinking
- name: sql_regeneration
llm: litellm_llm.default
engine: wren_ui
- name: instructions_indexing
embedder: litellm_embedder.default
document_store: qdrant
- name: instructions_retrieval
embedder: litellm_embedder.default
document_store: qdrant
- name: sql_functions_retrieval
engine: wren_ibis
document_store: qdrant
- name: project_meta_indexing
document_store: qdrant
- name: sql_tables_extraction
llm: litellm_llm.default
---
settings:
engine_timeout: 30
column_indexing_batch_size: 50
table_retrieval_size: 10
table_column_retrieval_size: 100
allow_intent_classification: true
allow_sql_generation_reasoning: true
allow_sql_functions_retrieval: true
enable_column_pruning: false
max_sql_correction_retries: 3
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
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
Wren AI Information
- Version: main latest
Additional context
Add any other context about the problem here.
Relevant log output
- [wren-ai-service:0.27.1]
bash
> embedding [src.pipelines.retrieval.db_schema_retrieval.embedding()] encountered an error<
Node inputs:
{'embedder': '<src.providers.embedder.litellm.AsyncTextEmbedder ...',
'histories': [],
'query': '不同采购订单类型的订单金额分布情况如何?'}
Traceback (most recent call last):
File "/app/.venv/lib/python3.12/site-packages/hamilton/async_driver.py", line 122, in new_fn
await fn(**fn_kwargs) if asyncio.iscoroutinefunction(fn) else fn(**fn_kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/langfuse/decorators/langfuse_decorator.py", line 219, in async_wrapper
self._handle_exception(observation, e)
File "/app/.venv/lib/python3.12/site-packages/langfuse/decorators/langfuse_decorator.py", line 520, in _handle_exception
raise e
File "/app/.venv/lib/python3.12/site-packages/langfuse/decorators/langfuse_decorator.py", line 217, in async_wrapper
result = await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/pipelines/retrieval/db_schema_retrieval.py", line 134, in embedding
return await embedder.run(query)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/backoff/_async.py", line 151, in retry
ret = await target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/providers/embedder/litellm.py", line 62, in run
response = await aembedding(
^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/litellm/utils.py", line 1586, in wrapper_async
raise e
File "/app/.venv/lib/python3.12/site-packages/litellm/utils.py", line 1437, in wrapper_async
result = await original_function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```