mirror of
https://ghfast.top/https://github.com/discourse/discourse-ai.git
synced 2026-07-16 11:36:23 +08:00
In this feature update, we add the UI for the ability to easily configure persona backed AI-features. The feature will still be hidden until structured responses are complete.
21 lines
497 B
JavaScript
21 lines
497 B
JavaScript
import RestAdapter from "discourse/adapters/rest";
|
|
|
|
export default class AiFeatureAdapter extends RestAdapter {
|
|
jsonMode = true;
|
|
|
|
basePath() {
|
|
return "/admin/plugins/discourse-ai/";
|
|
}
|
|
|
|
pathFor(store, type, findArgs) {
|
|
// removes underscores which are implemented in base
|
|
let path =
|
|
this.basePath(store, type, findArgs) +
|
|
store.pluralize(this.apiNameFor(type));
|
|
return this.appendQueryParams(path, findArgs);
|
|
}
|
|
|
|
apiNameFor() {
|
|
return "ai-feature";
|
|
}
|
|
}
|