mirror of
https://ghfast.top/https://github.com/discourse/discourse-ai.git
synced 2026-07-16 11:36:23 +08:00
Creating a new model, either manually or from presets, doesn't initialize the `provider_params` object, meaning their custom params won't persist. Additionally, this change adds some validations for Bedrock params, which are mandatory, and a clear message when a completion fails because we cannot build the URL.
17 lines
414 B
JavaScript
17 lines
414 B
JavaScript
import DiscourseRoute from "discourse/routes/discourse";
|
|
|
|
export default DiscourseRoute.extend({
|
|
async model() {
|
|
const record = this.store.createRecord("ai-llm");
|
|
record.provider_params = {};
|
|
return record;
|
|
},
|
|
|
|
setupController(controller, model) {
|
|
this._super(controller, model);
|
|
controller.set(
|
|
"allLlms",
|
|
this.modelFor("adminPlugins.show.discourse-ai-llms")
|
|
);
|
|
},
|
|
});
|