Maintaining Conversation History Across Sessions
NavTalk supports maintaining conversation history across multiple sessions, allowing the digital human to remember previous conversations and maintain context continuity.Workflow Overview
The conversation history workflow follows this sequence:- Store messages: Save user and assistant messages as they occur during the conversation
- Send configuration: When WebSocket connection opens, send
realtime.input_configmessage with voice, prompt, and optionally tools (for OpenAI models only) - Load on connection: Wait for
realtime.session.createdevent - Send history: Send stored user messages using
conversation.item.createmessages - Wait for ready: After sending history, wait for
realtime.session.updatedevent before starting audio input
Session configuration (voice, prompt, tools) is sent via
realtime.input_config message immediately after the WebSocket connection opens. The conversation.item.create messages are only used to send conversation history after receiving realtime.session.created.The tools parameter is optional and only applicable when using OpenAI models (gpt-realtime, gpt-realtime-mini). Function calling is not supported by other AI models.1
Store Conversation History
Save each conversation message to persistent storage as it occurs:
2
Load History on Session Start
When establishing a new WebSocket connection, load the stored history and send it to the server:
3
Restore Conversation Display
When the page loads, restore the conversation history display for the user: