2024-05-13 11:46:42 -04:00
|
|
|
import DiscourseRoute from "discourse/routes/discourse";
|
|
|
|
|
|
|
|
export default DiscourseRoute.extend({
|
|
|
|
async model(params) {
|
|
|
|
const allLlms = this.modelFor("adminPlugins.show.discourse-ai-llms");
|
|
|
|
const id = parseInt(params.id, 10);
|
2024-08-21 10:41:55 -04:00
|
|
|
const record = allLlms.findBy("id", id);
|
|
|
|
record.provider_params = record.provider_params || {};
|
|
|
|
return record;
|
2024-05-13 11:46:42 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
setupController(controller, model) {
|
|
|
|
this._super(controller, model);
|
|
|
|
controller.set(
|
|
|
|
"allLlms",
|
|
|
|
this.modelFor("adminPlugins.show.discourse-ai-llms")
|
|
|
|
);
|
|
|
|
},
|
|
|
|
});
|