- {{#if this.seeded}}
-
- {{icon "circle-exclamation"}}
- {{i18n "discourse_ai.llms.seeded_warning"}}
-
- {{/if}}
- {{#if this.modulesUsingModel}}
-
- {{icon "circle-exclamation"}}
- {{this.inUseWarning}}
-
- {{/if}}
-
+ {{i18n "discourse_ai.llms.seeded_warning"}}
+
+ {{/if}}
+
+ {{#if this.modulesUsingModel}}
+
+ {{this.inUseWarning}}
+
+ {{/if}}
+
+
+
+
+
+
+
+
+
+
+
+ {{#each this.selectedProviders as |provider|}}
+ {{provider.name}}
+ {{/each}}
+
+
+
{{#unless this.seeded}}
{{#if this.canEditURL}}
-
-
-
-
- {{/if}}
-
-
-
-
-
-
-
- {{#each this.metaProviderParams as |param|}}
-
-
- {{#if (eq param.type "enum")}}
-
- {{else if (eq param.type "checkbox")}}
-
- {{else}}
-
- {{/if}}
-
- {{/each}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ {{/if}}
+
+
+
+
+
+
+ {{#let
+ (get (this.metaProviderParams data.provider) name)
+ as |params|
+ }}
+
+ {{#if (eq params.type "enum")}}
+
+ {{#each params.values as |option|}}
+ {{option.name}}
+ {{/each}}
+
+ {{else if (eq params.type "checkbox")}}
+
+ {{else}}
+
+ {{/if}}
+
+ {{/let}}
+
+
+
+
+ {{#each this.tokenizers as |tokenizer|}}
+ {{tokenizer.name}}
+ {{/each}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{#if @model.user}}
-
+
{{/if}}
- {{#if this.showQuotas}}
-
-
-
-
+ {{#if (gt data.llm_quotas.length 0)}}
+
+
+
+
+
+
+
+ {{collectionData.group_name}} |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+
+
{{/if}}
-
-
+
- {{#if this.showAddQuotaButton}}
-
+
+ {{#if (eq data.llm_quotas.length 0)}}
+
- {{#if this.modalIsVisible}}
-
- {{/if}}
{{/if}}
-
+
{{#unless @model.isNew}}
-
{{/unless}}
-
+
{{/unless}}
-
- {{#if this.displayTestResult}}
- {{#if this.testRunning}}
-
- {{i18n "discourse_ai.llms.tests.running"}}
- {{else}}
- {{#if this.testResult}}
-
- {{icon "check"}}
- {{i18n "discourse_ai.llms.tests.success"}}
-
- {{else}}
-
- {{icon "xmark"}}
- {{this.testErrorMessage}}
-
- {{/if}}
- {{/if}}
- {{/if}}
-
-
+ {{#if this.displayTestResult}}
+
+
+
+ {{#if this.testResult}}
+
+ {{icon "check"}}
+ {{i18n "discourse_ai.llms.tests.success"}}
+
+ {{else}}
+
+ {{icon "xmark"}}
+ {{this.testErrorMessage}}
+
+ {{/if}}
+
+
+
+ {{/if}}
+
}
diff --git a/assets/javascripts/discourse/components/ai-llm-editor.gjs b/assets/javascripts/discourse/components/ai-llm-editor.gjs
index 29beb1fc..e8fac7d6 100644
--- a/assets/javascripts/discourse/components/ai-llm-editor.gjs
+++ b/assets/javascripts/discourse/components/ai-llm-editor.gjs
@@ -1,41 +1,16 @@
-import Component from "@glimmer/component";
-import { action } from "@ember/object";
import BackButton from "discourse/components/back-button";
import AiLlmEditorForm from "./ai-llm-editor-form";
-export default class AiLlmEditor extends Component {
- constructor() {
- super(...arguments);
- if (this.args.llmTemplate) {
- this.configurePreset();
- }
- }
+const AiLlmEditor =