Decorator to enable users to continue a conversation. Requires both data persistence and authentication to be enabled.

This decorator will automatically:

  • Send the persisted messages and elements to the UI.
  • Restore the user session.

Only JSON serializable fields of the user session will be saved and restored. If you are using a Langchain agent for instance, you will need to reinstantiate and set it in the user session yourself.

Usage

Resume Chat Example

Practical example of how to resume a chat with context.

Parameters

thread
ThreadDict

The persisted chat to resume.