How to save a dialog with chatgpt?

Describe the problem/bug/question

I have a question: how can I get chatgpt to remember previous messages and reply in their context?

I send a promt, for example, imagine you are a psychologist.

It sends a message that it has done so and waits for questions.

I send a new message, but he doesn’t remember the role and responds without remembering the old dialog.

That’s the settings I have:
Resource: Chat
Operation: completed
Model: gpt-4-0613
Role: User
Content: message

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Artem, the standard OpenAI node shown below does not have access to data from previous executions. You would need to store and retrieve such context outside of the OpenAI node.

You might, however, consider using the more advanced Langchain nodes instead. They will have additional option to retrieve context when needed. Check out the documentation at Tutorial: Build an AI workflow in n8n | n8n Docs.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.