-
Notifications
You must be signed in to change notification settings - Fork 40
FEATURE: Add periodic problem checks for each LLM in use #1020
Conversation
Co-authored-by: Penar Musaraj <[email protected]>
| def base_path | ||
| Discourse.base_path | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why, but calling Discourse.base_path by putting it in a function is the only way I can get it to work without seeing:
Translation missing: en.dashboard.problem.ai_llm_statusCalling Discourse.base_path directly inside try_validate results in the above error.
| prompt_message_length: The message %{idx} is over the 1000 character limit. | ||
| dashboard: | ||
| problem: | ||
| ai_llm_status: "The LLM model: %{model_name} is encountering issues. Please check the <a href='%{base_path}/admin/plugins/discourse-ai/ai-llms/%{model_id}'>model's configuration page</a>." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, it's actually recommended to build the URL in Ruby, and have a single %{url} parameter. If the URL ever changes, translators don't need to update their translations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gschlager When I change it to that I get this and it no longer works. I'm not sure why it's so finicky
and when I just pass the base_path separately:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it's the way we cache problem checks? I ran into it earlier in the week when working on encrypt: (internal /t/128444/7)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, @davidtaylorhq, I still consistently see the translation error when using %{url}(even after clearing the admin notice from the database and refreshing to run a new problem check)
| rescue => e | ||
| error_message = parse_error_message(e.message) | ||
| message = | ||
| "#{I18n.t("dashboard.problem.ai_llm_status", { base_path: base_path, model_name: model.display_name, model_id: model.id })}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. Late to the party. This shouldn't really need to be wrapped in an interpolation string? 🙂


🔍 Overview
This feature adds a periodic problem check which periodically checks for issues with LLMs that are in use. Periodically, we will run a test to see if the in use LLMs are still operational. If it is not, the LLM with the problem is surfaced to the admin so they can easily go and update the configuration.
📸 Screenshots