#how can i pass information from api to global system prompt

1 messages · Page 1 of 1 (latest)

crisp plankBOT
#
AI-generated Answer for supriya_06985

Currently, ElevenLabs' Conversational AI doesn't support direct variables in the global system prompt. However, there are a couple of ways to customize the context for each conversation:

  1. Dynamic Conversation Overrides: You can override the agent's configuration at the start of each conversation. This allows you to provide dynamic context without manually enabling it for every agent. Here's an example:
const conversation = await Conversation.startSession({
  overrides: {
    agent: {
      prompt: {
        prompt: `The customer's bank account balance is ${customer_balance}. They are based in ${customer_location}.`
      },
      first_message: `Hi ${customer_name}, how can I help you today?`,
    },
    tts: {
      voiceId: "" // override the voice ID dynamically
    }
  },
  // ...
});
  1. API Updates: You can update the agent's system prompt via the API using the PATCH Update Agent request. This should be done before starting a conversation, as changes mid-conversation won't take effect until a new one begins.

It's worth noting that the ElevenLabs team is actively working on implementing system prompt variables, which may provide a more straightforward solution in the future.

If you need more specific functionality or have complex use cases, you might want to consider exploring the Enterprise plan, which offers custom settings and increased limits beyond the self-serve plans.

wide edge
#

in python please