mirror of
https://ghfast.top/https://github.com/discourse/discourse-ai.git
synced 2026-05-26 01:04:52 +08:00
* Use AR model for embeddings features * endpoints * Embeddings CRUD UI * Add presets. Hide a couple more settings * system specs * Seed embedding definition from old settings * Generate search bit index on the fly. cleanup orphaned data * support for seeded models * Fix run test for new embedding * fix selected model not set correctly
21 lines
490 B
JavaScript
21 lines
490 B
JavaScript
import RestAdapter from "discourse/adapters/rest";
|
|
|
|
export default class Adapter 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-embedding";
|
|
}
|
|
}
|