18 lines
552 B
TypeScript
18 lines
552 B
TypeScript
import { env, pipeline } from '@huggingface/transformers';
|
|
|
|
import { EMBEDDING_MODEL } from './utils/utils.consts.js';
|
|
|
|
const setModelLocation = (location: string) => {
|
|
env.cacheDir = location;
|
|
};
|
|
|
|
const preloadModel = async () => {
|
|
await pipeline('feature-extraction', EMBEDDING_MODEL);
|
|
};
|
|
|
|
export { Services } from './utils/utils.services.js';
|
|
export { StashRuntime } from './runtime.js';
|
|
export * from './services/documents/documents.js';
|
|
export * from './services/document-chunks/document-chunks.js';
|
|
export { setModelLocation, preloadModel };
|