attu
attu copied to clipboard
Can you add an interface to get the embedding array from the remote end?
Describe the feature: When I use attu to search, I often need to use the model to embedding the search content first, and then convert the vector result to the format before querying. Can you provide an interface so that I can send the embedding content to the remote machine, and then I return a vector array to attu. Attu doesn't care how I parse it, you just need to send the information to the specified location.
nice idea, let me think about it how to design it.
@shanghaikid Maybe this could be a good start referred: https://github.com/botisan-ai/sentence-transformers.js/blob/main/src/index.ts https://huggingface.co/docs/transformers.js/api/pipelines
import { env } from "@xenova/transformers";
import { SentenceTransformer } from "./model.js";
async function main() {
console.log(env);
const sentenceTransformer = await SentenceTransformer.from_pretrained(
"Supabase/bge-small-en"
);
await sentenceTransformer.encode(["Hello world", "How are you guys doing?"]);
}
main();