-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Telemetry include basic llm optional promps, trigger on save workflow event #8981
Conversation
const isCloudDeployment = config.getEnv('deployment.type') === 'cloud'; | ||
|
||
const { nodeGraph } = TelemetryHelpers.generateNodesGraph(workflow, this.nodeTypes, { | ||
isCloudDeployment, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we filtering for cloud? The story doesn't mention this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is followup to this issue, should be enabled on cloud only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, let's use config
inside the function itself.
nodeItem.prompts = | ||
(((node.parameters?.messages as IDataObject) || {}).messageValues as IDataObject[]) || []; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please find a way to avoid so many assertions? And use nullish coalescing instead of ||
? Also is there really a case where prompts will be an empty array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we had to use those assertions as parameter would not be included if value is default, yes by default in basic llm it is an empty array
packages/cli/src/InternalHooks.ts
Outdated
@@ -488,7 +492,7 @@ export class InternalHooks { | |||
? this.eventBus.sendWorkflowEvent({ | |||
eventName: 'n8n.workflow.success', | |||
payload: sharedEventPayload, | |||
}) | |||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some formatting issues to autofix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prettier got got confused here, I did refactor code slightly
…lemetry-prompts-missing-in-some-events
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving to unblock the release, we discuss minor details later.
2 flaky tests on run #4481 ↗︎
Details:
17-sharing.cy.ts • 1 flaky test
5-ndv.cy.ts • 1 flaky test
Review all test suite changes for PR #8981 ↗︎ |
✅ All Cypress E2E specs passed |
Got released with |
Summary
Telemetry prompts missing in some events
Related tickets and issues
https://linear.app/n8n/issue/AI-161/telemetry-prompts-missing-in-some-events