באג ב-Discourse AI?

I’m encountering some bugs while using Discourse AI. Here’s the situation:
First, let’s look at a correct post to demonstrate that my configuration is not the issue and everything is working as I intended.
My site’s base language is Simplified Chinese, and there are 9 other languages available.
This “New post test 0 translation” post is normal.

However, some individual posts are experiencing issues. For example:
This “About ‘Image Library’ category” post. The original post was published in Simplified Chinese (it was automatically published when the category was created).
But in the translation results, the original Simplified Chinese has been translated into “zh_CN” again, instead of being translated into English.

When I tried to manually add the English translation using the red globe icon, something strange


In the dropdown list, I am unable to add a separate translation for English.
However, in my global settings, English (US) has already been added correctly.

I have disabled the CDN cache and repeatedly cleared the local browser cache.
This rules out caching as the problem.
My basic configuration can also be ruled out, as the first image shows the correct behavior.
I don’t understand why this problem is happening. How can I fix it?
My Discourse version is 3.6.0.beta1-dev(b8e86ceb23)
The server OS is Debian 12.12
I have tested this locally using the latest versions of both Chrome and Opera browsers.
URL for the correct case: https://openttc.com/t/topic/61
URL for the incorrect case: https://openttc.com/t/topic/58

זו לא באג. מכיוון שכל ההסברים לקטגוריות (שנוצרו על ידי המערכת) ברירת המחדל שלהם היא En. לא משנה מה תזין, ברירת המחדל תהיה פוסט En. לכן, התרגום לא יופעל.

Every post has a detected language done by AI.

If you have a post originally written in “Chinese”, by right, the LLM should detect it to be “zh_CN”. You can view the detected language in the regular composer (not the translation composer) next to the :globe_with_meridians: .

The detected language is important so that the translator does not unnecessarily translate it to the detected language itself, and translates the post to every other language.

I suspect what is happening with https://openttc.com/t/topic/58 is that the detected language is incorrect, can you check?

לייק 1

כן. זה זוהה בטעות כ-en במקום zh_CN. בדקתי ומצאתי שכל פוסטים של תיאור קטגוריות שנוצרו על ידי המערכת זוהו כ-en. אפילו אם הם נכתבו בסינית.
שאלה חדשה: האם דף השאלות הנפוצות תומך בריבוי שפות? היכן יש להוסיף תרגומים?

לייק 1

I believe the FAQ page uses the typical I18n keys. You can go to your site’s admin page for site texts @ e.g. https://openttc.com/admin/customize/site_texts?q=guidelines_topic.body to replace it.

לייק 1

Okay, thank you very much for your help.

I think this is a real problem. I don’t know if this situation is common or due to my configuration error.

זה יכול להיות קשור גם לזמן. אם הקטגוריות נוצרו לפני שהשפת האתר הוחלפה, שפות הנושאים של הקטגוריות יכולות להיות כולן באנגלית.

במקרה כזה, תוכלו לעבור לפוסט הראשון של הנושאים, לפתוח את ה-composer, ולשנות אותם לסינית.

Hello. After my attempts.
I created a new category 6 minutes ago: https://openttc.com/t/topic/66
Then I did nothing. Waiting for the translation to take effect.
After that, I got a post whose content is Chinese but was recognized as en.
image
image
When this category was created, my site language was 100% Simplified Chinese.
My AI model uses Openrouter’s Llama3.1 8b.

מעניין, האם תוכל להריץ את השאילתה הזו של בורר הנתונים?

-- [params]
-- integer :topic_id = 66

SELECT 
  a.id,
  a.created_at,
  a.response_tokens,
  (REGEXP_MATCH(a.raw_response_payload, '"text": "([^"\\]+)"'))[1] AS llm_detected_locale,
  a.raw_response_payload
FROM ai_api_audit_logs a
JOIN posts p ON p.id = a.post_id AND p.deleted_at IS NULL
LEFT JOIN topics t ON t.id = a.topic_id AND t.deleted_at IS NULL
WHERE t.id = :topic_id
AND p.post_number = 1
AND a.feature_name = 'translation'
AND a.response_tokens < 5

זה אמור לומר לנו מה ה-LLM מחזיר בפועל.

Hello. I ultimately did not resolve this issue, but it has had little impact.
The most accurate description of the problem should be: When I create a new category, the default language of the “About this category” post automatically generated by the system is recognized as “en”. Although the text content is indeed Simplified Chinese, when I open the post, it is recognized as English and needs to be manually changed.
I’m not sure if this is related to my app.yml file settings?