* 👷 basic skeleton for building with pkg * ⚡️ first attempt at syncing in .ts * 🎨 change lancedb storage format * 🚧 add chunking to LanceDbIndex * 🔥 move transformers.js from gui to core * 🐛 fix tsc build * 🐛 fix bugs loading native modules in vscode extension * 👷 copy wasms and fix other syncing bugs * 👷 esbuild modification to allow importMetaUrl for transformers.js * 👷 add sharp as external module so transformers.js can be loade * 🐛 more indexing fixes * ✨ retrieve from lancedb * 🎨 respect .gitignore when traversing file tree * 🐛 fix logic bugs in indexing * 🐛 fix prompt construction bug causing doubling of context items * 🔥 remove legacy files * 📌 vendor transformers.js to avoid dependency on sharp * 👷 package necessary native modules * 🎨 respect multi-root workspaces when indexing/retrieving * 🔥 only ship onnxruntime-node binaries for current platform * 🎨 trigger re-indexing on git branch change * 🎨 make indexing resumable * ✨ add folder context provider * ✨ folders context provider in dropdown * 🐛 polishing folders context provider
23 lines
602 B
TypeScript
23 lines
602 B
TypeScript
import { EmbedOptions, EmbeddingsProvider } from "../..";
|
|
|
|
class BaseEmbeddingsProvider implements EmbeddingsProvider {
|
|
options: EmbedOptions;
|
|
static defaultOptions: Partial<EmbedOptions> | undefined = undefined;
|
|
|
|
get id(): string {
|
|
throw new Error("Method not implemented.");
|
|
}
|
|
|
|
constructor(options: EmbedOptions) {
|
|
this.options = {
|
|
...(this.constructor as typeof BaseEmbeddingsProvider).defaultOptions,
|
|
...options,
|
|
};
|
|
}
|
|
|
|
embed(chunks: string[]): Promise<number[][]> {
|
|
throw new Error("Method not implemented.");
|
|
}
|
|
}
|
|
|
|
export default BaseEmbeddingsProvider;
|