ci: add server build
This commit is contained in:
@@ -1,4 +1,17 @@
|
||||
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 };
|
||||
|
||||
Reference in New Issue
Block a user