Add UI plugin for vectors

This commit is contained in:
Cohee
2023-09-08 00:28:06 +03:00
parent 92ab17b58b
commit 9d45c0a018
5 changed files with 298 additions and 3 deletions

View File

@@ -12,14 +12,14 @@ class EmbeddingModel {
/**
* @type {encoder.UniversalSentenceEncoder} - The embedding model
*/
#model;
model;
async get() {
if (!this.#model) {
if (!this.model) {
this.model = await encoder.load();
}
return this.#model;
return this.model;
}
}