Fix DisposedError during slow batch embedding (#41)
This commit is contained in:
parent
f6a987a642
commit
6d9871d2f5
@ -567,6 +567,7 @@ export class LlamaCpp implements LLM {
|
||||
texts.map(async (text) => {
|
||||
try {
|
||||
const embedding = await context.getEmbeddingFor(text);
|
||||
this.touchActivity(); // Keep-alive during slow batches
|
||||
return {
|
||||
embedding: Array.from(embedding.vector),
|
||||
model: this.embedModelUri,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user