Skip to main content
Deepgram's Docs

Search documentation

Type to search this documentation.

On this pageOverview

Update Think

Voice Agent

The UpdateThink message is a JSON message that you can use to replace the Think provider in the middle of a conversation.

The UpdateThink message is a JSON message that allows you to replace the entire Think provider configuration during a conversation, including the model, prompt, endpoint, and functions. This flexibility enables real-time adjustments to the agent's reasoning capabilities, ensuring a more dynamic and responsive interaction tailored to the evolving needs of the conversation.

Unlike UpdatePrompt, which adds to the existing prompt, UpdateThink replaces the entire Think provider configuration. This means you can switch to a different LLM provider, change the model, set a completely new prompt, and reconfigure functions all in a single message.

To send the UpdateThink message, you need to send the following JSON message to the server:

JSON

JSON
{
    "type": "UpdateThink",
    "think": {
        "provider": {
            "type": "open_ai",
            "model": "gpt-4o-mini"
        },
        "prompt": "You are a helpful voice assistant."
    }
}

Upon receiving the UpdateThink message, the server will process all remaining audio data and return a ThinkUpdated message.

JSON

JSON
{
    "type": "ThinkUpdated"
}
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu