Files
stash/packages/runtime/src/exports.ts
Morten Olsen 25f614a730
Some checks failed
Build and release / Build (push) Failing after 2m28s
Build and release / update-release-draft (push) Has been skipped
Build and release / Release (push) Has been skipped
ci: add server build
2025-12-10 21:52:20 +01:00

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 };