Health Care Consultant Configuration

{
    "persona_name": "Personal Doctor",
    "pipeline_mode": "full",
    "system_prompt": "You are a friendly Personal Doctor who knows cures to all diseases. In this call, users want to know the cure for their illness.",
    "context": "Users may ask questions like \"What is the cure to X?\" You should acknowledge the disease and call the get_cures tool with the disease name.",
    "default_replica_id":"r18e9aebdc33",
    "layers": {
      "tts": {
        "tts_engine": "cartesia",
        "tts_emotion_control": true
      },
      "llm": {
        "tools": [
          {
            "type": "function",
            "function": {
              "name": "get_cures",
              "description": "Fetch cures for the specified disease.",
              "parameters": {
                "type": "object",
                "required": ["disease"],
                "properties": {
                  "disease": {
                    "type": "string",
                    "description": "The disease the user wants to cure."
                  }
                }
              }
            }
          }
        ],
        "model": "tavus-llama",
        "speculative_inference": true
      },
      "stt": {
        "stt_engine": "tavus-advanced",
        "participant_pause_sensitivity": "high",
        "participant_interrupt_sensitivity": "high",
        "smart_turn_detection": true
      }
    }
}

This predefined persona is designed to act as a friendly virtual doctor, offering quick answers to user health inquiries. It includes:

  • Persona Identity: A helpful and knowledgeable “Health Care” assistant who can provide medicines to cure various diseases.

  • Full Pipeline Mode: Enables the full Tavus conversational pipeline, including Perception, STT, LLM, and TTS.

  • System Prompt: Instructs the replica to behave as a trusted medical advisor. It ensures the persona understands its role in responding to disease-related questions and calling the appropriate tool to provide answers.

  • Context: Clarifies expected user inputs (e.g., “What is the cure to X?”) and defines how the replica should interpret and respond—by acknowledging the illness and triggering the get_cures function with the specified disease name.

  • Model Layers:

    • LLM Configuration: Uses the tavus-llama model with speculative inference. Includes the get_cures tool, which accepts a single string parameter (disease) and limits AI behavior to relevant function calls only when disease-related queries are detected.

    • TTS Layer: Employs the cartesia voice engine with emotion control.

    • STT Layer: Uses tavus-advanced engine with smart turn detection for seamless real-time conversations.

You can also explore our Health Consultation sample apps, which showcase how to use the Health Care personas in practice.

Create a Conversation with the Health Care Consultant

  1. Create the Health Care persona using the following request:
curl --request POST \
  --url https://tavusapi.com/v2/personas \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
    "persona_name": "Personal Doctor",
    "pipeline_mode": "full",
    "system_prompt": "You are a friendly Personal Doctor who knows cures to all diseases. In this call, users want to know the cure for their illness.",
    "context": "Users may ask questions like \"What is the cure to X?\" You should acknowledge the disease and call the get_cures tool with the disease name.",
    "layers": {
      "tts": {
        "tts_engine": "cartesia",
        "tts_emotion_control": true
      },
      "llm": {
        "tools": [
          {
            "type": "function",
            "function": {
              "name": "get_cures",
              "description": "Fetch cures for the specified disease.",
              "parameters": {
                "type": "object",
                "required": ["disease"],
                "properties": {
                  "disease": {
                    "type": "string",
                    "description": "The disease the user wants to cure."
                  }
                }
              }
            }
          }
        ],
        "model": "tavus-llama",
        "speculative_inference": true
      },
      "stt": {
        "stt_engine": "tavus-advanced",
        "participant_pause_sensitivity": "high",
        "participant_interrupt_sensitivity": "high",
        "smart_turn_detection": true
      }
    }
  }'

  1. Create a conversation using the following request:
cURL
curl --request POST \
  --url https://tavusapi.com/v2/conversations \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api_key>' \
  --data '{
  "persona_id": "<health_care_persona_id>"
}'
  • Replace <api_key> with your actual API key. You can generate one by following the steps in the Quickstart guide.
  • Replace <health_care_persona_id> with the ID of the persona configured as either a General Doctor or a Dermatologist.
  1. Click the link in the conversation_url field to join the conversation:
{
  "conversation_id": "c7f3fc6d799f",
  "conversation_name": "New Conversation 1747719531479",
  "conversation_url": "<conversation_link>",
  "status": "active",
  "callback_url": "",
  "created_at": "2025-05-20T05:38:51.501467Z"
}