Skip to content
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: Add support for AI log streaming #8526

Merged
merged 10 commits into from
Feb 9, 2024
Merged

Conversation

krynble
Copy link
Contributor

@krynble krynble commented Feb 1, 2024

Summary

This PR adds AI-related log streaming events. The following events were implemented:

n8n.ai.memory.get.messages
n8n.ai.memory.added.message
n8n.ai.output.parser.get.instructions
n8n.ai.output.parser.parsed
n8n.ai.retriever.get.relevant.documents
n8n.ai.embeddings.embedded.document
n8n.ai.embeddings.embedded.query
n8n.ai.document.processed
n8n.ai.text.splitter.split
n8n.ai.tool.called
n8n.ai.vector.store.searched
n8n.ai.llm.generated
n8n.ai.vector.store.populated

Related tickets and issues

Include links to Linear ticket or Github issue or Community forum post. Important in order to close automatically and provide context to reviewers.

Review / Merge checklist

  • PR title and summary are descriptive. Remember, the title automatically goes into the changelog. Use (no-changelog) otherwise. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.

    A bug is not considered fixed, unless a test is added to prevent it from happening again.
    A feature is not complete without tests.

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Feb 1, 2024
@OlegIvaniv OlegIvaniv changed the title Feature/ai log streaming feat: Add support for AI log streaming Feb 7, 2024
@krynble krynble force-pushed the feature/ai-log-streaming branch from 6bb7edb to aa4ad81 Compare February 8, 2024 18:08
@krynble krynble marked this pull request as ready for review February 9, 2024 08:30
Copy link

cypress bot commented Feb 9, 2024

3 flaky tests on run #4058 ↗︎

0 341 5 0 Flakiness 3

Details:

🌳 🖥️ browsers:node18.12.0-chrome107 🤖 krynble 🗃️ e2e/*
Project: n8n Commit: 31bc98b71c
Status: Passed Duration: 03:30 💡
Started: Feb 9, 2024 8:43 AM Ended: Feb 9, 2024 8:47 AM
Flakiness  5-ndv.cy.ts • 1 flaky test

View Output Video

Test Artifacts
NDV > should not retrieve remote options when required params throw errors Test Replay Screenshots Video
Flakiness  13-pinning.cy.ts • 1 flaky test

View Output Video

Test Artifacts
Data pinning > Should be able to reference paired items in a node located before pinned data Test Replay Screenshots Video
Flakiness  19-execution.cy.ts • 1 flaky test

View Output Video

Test Artifacts
Execution > should test manual workflow stop Test Replay Screenshots Video

Review all test suite changes for PR #8526 ↗︎

Copy link
Contributor

github-actions bot commented Feb 9, 2024

✅ All Cypress E2E specs passed

@krynble krynble merged commit 7501ad8 into master Feb 9, 2024
31 checks passed
@krynble krynble deleted the feature/ai-log-streaming branch February 9, 2024 09:41
@github-actions github-actions bot mentioned this pull request Feb 15, 2024
@janober
Copy link
Member

janober commented Feb 15, 2024

Got released with [email protected]

cstuncsik pushed a commit that referenced this pull request Feb 17, 2024
OlegIvaniv added a commit that referenced this pull request Feb 19, 2024
ivov added a commit that referenced this pull request Sep 11, 2024
This PR brings the AI events in line with all other log streaming events
in the relay, breaks a dependency cycle in `WorkflowExecuteAdditionalData`,
stops awaiting on log streaming during the AI nodes execution, and adds
tests for all AI log streaming events.

Notes:
- Removed `n8n.ai.output.parser.get.instructions` as it was unused.
- `cli` does not import `workflow` so I had to duplicate two small types.
Once we have a common types package this should no longer be an issue.

Follow-up to: #8526
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team Released ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants