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

@@ -138,7 +138,7 @@ export class N8nLlmTracing extends BaseCallbackHandler {
this.executionFunctions.addOutputData(this.connectionType, runDetails.index, [
[{ json: { ...response } }],
]);
void logAiEvent(this.executionFunctions, 'n8n.ai.llm.generated', {
void logAiEvent(this.executionFunctions, 'ai-llm-generated-output', {
messages: parsedMessages,
options: runDetails.options,
response,
@@ -186,7 +186,7 @@ export class N8nLlmTracing extends BaseCallbackHandler {
});
}
void logAiEvent(this.executionFunctions, 'n8n.ai.llm.error', {
void logAiEvent(this.executionFunctions, 'ai-llm-errored', {
error: Object.keys(error).length === 0 ? error.toString() : error,
runId,
parentRunId,