Explorar el Código

Fix DisposedError during slow batch embedding (#41)

Christopher Jones hace 3 meses
padre
commit
6d9871d2f5
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      src/llm.ts

+ 1 - 0
src/llm.ts

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