refactor(core): Include AI events in log streaming relay (#10768)

This commit is contained in:
Iván Ovejero
2024-09-12 12:02:47 +02:00
committed by GitHub
parent 8240b2a142
commit c133a6ef89
15 changed files with 496 additions and 92 deletions

View File

@@ -280,7 +280,7 @@ export const createVectorStoreNode = (args: VectorStoreNodeConstructorArgs) =>
});
resultData.push(...serializedDocs);
void logAiEvent(this, 'n8n.ai.vector.store.searched', { query: prompt });
void logAiEvent(this, 'ai-vector-store-searched', { query: prompt });
}
return [resultData];
@@ -307,7 +307,7 @@ export const createVectorStoreNode = (args: VectorStoreNodeConstructorArgs) =>
try {
await args.populateVectorStore(this, embeddings, processedDocuments, itemIndex);
void logAiEvent(this, 'n8n.ai.vector.store.populated');
void logAiEvent(this, 'ai-vector-store-populated');
} catch (error) {
throw error;
}
@@ -361,7 +361,7 @@ export const createVectorStoreNode = (args: VectorStoreNodeConstructorArgs) =>
ids: [documentId],
});
void logAiEvent(this, 'n8n.ai.vector.store.updated');
void logAiEvent(this, 'ai-vector-store-updated');
} catch (error) {
throw error;
}