WrenAI icon indicating copy to clipboard operation
WrenAI copied to clipboard

The response language is not aligned with the project settings.

Open wirelessr opened this issue 8 months ago • 1 comments

Describe the bug My project is set to English, but the suggested questions are in a language I don’t recognize.

For example,

  1. ¿Cuántos departamentos tienen un nombre que comience con la letra 'M'?
  2. ¿Qué es el título actual del empleado con emp_no = 10001?

To Reproduce After initializing, wait and see.

Expected behavior Useful or not, the recommendations should at least be in English.

Screenshots

Image

Desktop (please complete the following information):

  • OS: Mac
  • Browser: Chrome

Wren AI Information

  • Version: 0.19.1

Additional context Add any other context about the problem here.

Relevant log output

type: llm
provider: litellm_llm
timeout: 120
models:
  - model: ollama_chat/llama3.1:8b
    alias: default
    api_base: http://host.docker.internal:11434
    kwargs:
      temperature: 0
      n: 1
      seed: 0
      max_tokens: 4096

---
type: embedder
provider: litellm_embedder
models:
  - model: ollama/nomic-embed-text
    alias: default
    timeout: 120
    api_base: http://host.docker.internal:11434
I0415 07:39:09.569 8 wren-ai-service:175] SQL Generation Reasoning pipeline is running...

********************************************************************************
> construct_retrieval_results [src.pipelines.retrieval.retrieval.construct_retrieval_results()] encountered an error<
> Node inputs:
{'check_using_db_schemas_without_pruning': "<Task finished name='Task-3893' "
                                           'coro=<AsyncGraphAd...',
 'construct_db_schemas': "<Task finished name='Task-3892' "
                         'coro=<AsyncGraphAd...',
 'dbschema_retrieval': "<Task finished name='Task-3891' coro=<AsyncGraphAd...",
 'filter_columns_in_tables': "<Task finished name='Task-3895' "
                             'coro=<AsyncGraphAd...'}
********************************************************************************
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 256, in sync_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 254, in sync_wrapper
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/src/pipelines/retrieval/retrieval.py", line 332, in construct_retrieval_results
    columns_and_tables_needed = orjson.loads(
                                ^^^^^^^^^^^^^
orjson.JSONDecodeError: unexpected end of data: line 356 column 83 (char 21260)
-------------------------------------------------------------------
Oh no an error! Need help with Hamilton?
Join our slack and ask for help! https://join.slack.com/t/hamilton-opensource/shared_invite/zt-2niepkra8-DGKGf_tTYhXuJWBTXtIs4g
-------------------------------------------------------------------

E0415 07:40:29.803 8 wren-ai-service:151] Request 5404ab37-40c4-49a8-a2f6-38025481aeff: Error validating question: unexpected end of data: line 356 column 83 (char 21260)

wirelessr avatar Apr 15 '25 07:04 wirelessr

@wirelessr Any solutions, I also faced this problem but rarely and sometimes the answer itself is in a different language.

omarragi9 avatar May 28 '25 08:05 omarragi9