#ConversationConfig( conversation_config_override={ } ) this get st
1 messages · Page 1 of 1 (latest)
The conversation_config_override is used to customize the settings for a specific conversation session. These settings are applied only to the current session and do not persist globally. If you want to update the main global system prompt, you need to use the API to make a separate request before starting a new conversation. Changes made mid-conversation won't take effect until a new session begins.
For more detailed information on how to handle conversation initiation and configuration, you can refer to the WebSocket - ElevenLabs documentation.
but i need to extract certai details from override
To extract details from the conversation_config_override, you can access the conversation_initiation_client_data message, which includes the initial conversation configuration. This configuration can contain agent prompt overrides, preferred language, TTS voice settings, and custom LLM parameters.
However, these settings are specific to the current session and do not update the global system prompt. If you need to update the global system prompt, you would need to use the API to make changes before starting a new conversation.
For more detailed information on how to handle conversation initiation and overrides, you can refer to the WebSocket - ElevenLabs documentation.
but i need to extract certai details from override in the same session to hit tool webhook
To handle overrides and extract certain details within the same session, you can dynamically pass the desired context when starting the session using the API. This allows you to manage the session data and use it as needed, such as hitting a tool webhook.
Here's an example of how you can achieve this:
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
}
},
// Additional session data can be added here
});
By using this method, you can extract and utilize the override details within the session, allowing you to perform actions like hitting a webhook with the necessary data.
do i need to add first message?
To extract certain details from the override in the same session, you can include them in the conversation_initiation_client_data message. This allows you to send initial conversation configuration, including agent prompt overrides and other settings, to the server. Here's an example format:
{
"type": "conversation_initiation_client_data",
"conversation_config_override": {
"agent": {
"prompt": {
"prompt": "You are a helpful AI assistant. You are cheerful and friendly."
},
"first_message": "Hi! How can I help you today?",
"language": "en"
},
"tts": {
"voice_id": "pNInz6obpgDQGcFmaJgB"
}
},
"custom_llm_extra_body": {
"temperature": 0.7,
"max_tokens": 150
}
}
Including a first message is optional, but it can be useful to set the tone or context for the conversation right from the start. If you need to hit a tool webhook, ensure that the necessary details are included in the conversation_config_override so they can be accessed during the session.
do i need to include in global system prompt to extract certain details fromoverrides?
To extract certain details from the override in the same session, you can dynamically provide context using the API when starting the session. This allows you to pass specific information, such as prompts and first messages, without needing to manually configure each agent in the UI.
Including a first message can be helpful if you want to set the tone or context for the conversation right from the start. However, it is not mandatory unless your specific use case requires it.
For global system prompts, these are typically set to guide the overall behavior and style of the agent. If you need to extract details from overrides, ensure that your system prompt is structured to handle and process the information you pass dynamically.
If you need further customization or have specific requirements, consider using the API to handle these configurations.
raise self.protocol.close_exc from original_exc
websockets.exceptions.ConnectionClosedError: received 1011 (internal error) Unexpected error in websocket endpoint: Agent first message override is not allowed for this agent; then sent 1011 (internal error) Unexpected error in websocket endpoint: Agent first message override is not allowed for this agent