Fix DisposedError during slow batch embedding (#41)

This commit is contained in:
Christopher Jones 2026-01-30 03:28:48 +01:00 committed by GitHub
parent f6a987a642
commit 6d9871d2f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,