thesys|
OpenUI

Persistence (Threads)

Configure threadApiUrl and load/save chat history.

To persist conversations, pass threadApiUrl or provide custom thread functions.

REST-style setup

import { FullScreen } from "@openuidev/react-ui";

<FullScreen apiUrl="/api/chat" threadApiUrl="/api/threads" />;

Expected endpoints under /api/threads:

ActionMethodURL
List threadsGET/api/threads
Create threadPOST/api/threads
Update threadPUT/api/threads/:id
Delete threadDELETE/api/threads/:id
Load messagesGET/api/threads/:id/messages

Custom functions

If your API is non-REST or needs custom auth, pass:

  • fetchThreadList
  • createThread
  • updateThread
  • deleteThread
  • loadThread

For the full payload spec, see The API Contract.

On this page