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(Postgres Chat Memory Node): Implement Postgres Chat Memory node #10071

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

OlegIvaniv
Copy link
Contributor

@OlegIvaniv OlegIvaniv commented Jul 16, 2024

Summary

  • Add Postgres Chat Memory
  • Improve wrapping of BaseChatMessageHistory & BaseChatMemory in logWrapper to make sure sub-node input/ouput is correctly populated

Docs: n8n-io/n8n-docs#2241

How to test

  1. Spin-up a Postgres instance, for example with docker-compose:
version: '3.9'

services:
  postgres:
    image: postgres:14-alpine
    ports:
      - 5432:5432
    volumes:
      - ./db:/var/lib/postgresql/data
    environment:
      - POSTGRES_PASSWORD=password
      - POSTGRES_USER=chat
      - POSTGRES_DB=chat

Related Linear tickets, Github issues, and Community forum posts

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Jul 16, 2024
burivuhster
burivuhster previously approved these changes Jul 16, 2024
Copy link
Contributor

@burivuhster burivuhster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Minor comments, non-blocking.

packages/@n8n/nodes-langchain/utils/helpers.ts Outdated Show resolved Hide resolved
packages/@n8n/nodes-langchain/utils/helpers.ts Outdated Show resolved Hide resolved
Copy link

cypress bot commented Jul 16, 2024

4 flaky tests on run #5951 ↗︎

0 400 0 0 Flakiness 4

Details:

🌳 🖥️ browsers:node18.12.0-chrome107 🤖 OlegIvaniv 🗃️ e2e/*
Project: n8n Commit: 1e61222ece
Status: Passed Duration: 05:22 💡
Started: Jul 16, 2024 3:40 PM Ended: Jul 16, 2024 3:46 PM
Flakiness  5-ndv.cy.ts • 2 flaky tests

View Output Video

Test Artifacts
NDV > should not retrieve remote options when required params throw errors Screenshots Video
NDV > Stop listening for trigger event from NDV Screenshots Video
Flakiness  10-undo-redo.cy.ts • 1 flaky test

View Output Video

Test Artifacts
Undo/Redo > should undo/redo adding connected nodes Test Replay Screenshots Video
Flakiness  24-ndv-paired-item.cy.ts • 1 flaky test

View Output Video

Test Artifacts
NDV > resolves expression with default item when input node is not parent, while still pairing items Test Replay Screenshots Video

Review all test suite changes for PR #10071 ↗︎

Copy link
Contributor

✅ All Cypress E2E specs passed

@OlegIvaniv OlegIvaniv force-pushed the ai-187-postgres-memory-sub-node branch from cbfa9ad to 685ddd4 Compare July 16, 2024 13:43
Copy link
Contributor

✅ All Cypress E2E specs passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants