afraid-scarlet
afraid-scarlet8mo ago

Tool messages in different languages

Is there any way to make my tool start and end messages be in whatever language the model is speaking in? It appears to be hardcoded to whatever I put in the box.
9 Replies
Atlas
Atlas8mo ago
HeySal Thank you for creating the ticket! A member of our team will reach out to you shortly.
Vapi
Vapi8mo ago
@Sal Yes, you can localize the start and end messages for your tool to match the language the model is speaking in. To achieve this, you would typically need to implement a localization system within your tool that can detect the language context and select the appropriate messages accordingly. If your tool currently doesn't support dynamic localization, you might need to update it to include this feature. This could involve setting up a database or a dictionary of messages in different languages and adding logic to your tool to choose the right message based on the user's language preference or the detected language. If you need assistance with implementing this feature or have any specific questions about how to set it up, please let me know, and I'll be happy to help! You can continue this conversation by mentioning me in the message.
deep-jade
deep-jade8mo ago
@Sal Yes, it is already available, and I am having difficulty recalling how it was accomplished. Please allow me some time to respond to you regarding this matter.
afraid-scarlet
afraid-scarletOP8mo ago
https://discord.com/channels/1211482211119796234/1291142916613603348/1292159190525149346 Saw this message you posted on a different thread. Can I set multiple “request-start” messages for a tool? If so, will the model just pick the one that is in the correct language? Will try some out tomorrow.
deep-jade
deep-jade8mo ago
@Sal It is necessary to utilize the contents property of tool messages and incorporate the message within the contents. If the user's language contents are available, they will be selected; otherwise, the initial message will be translated into the user's language. Below is an example of the request start message type. Please inform me if you require any further assistance.
{
"type": "request-start",
"contents": [
{
"type": "string",
"language": "en",
"text": "Heyoo what's up, ... how's going?"
}
]
}
{
"type": "request-start",
"contents": [
{
"type": "string",
"language": "en",
"text": "Heyoo what's up, ... how's going?"
}
]
}
No description
afraid-scarlet
afraid-scarletOP8mo ago
@Shubham Bajaj Ok so I have these "messages" set on my tool:
"messages": [
{
"type": "request-start",
"contents": [
{
"text": "Let me check on that for you.",
"type": "text",
"language": "en"
}
]
},
{
"type": "request-start",
"contents": [
{
"text": "Por favor, espere mientras lo reviso por usted.",
"type": "text",
"language": "es"
}
]
}
],
"messages": [
{
"type": "request-start",
"contents": [
{
"text": "Let me check on that for you.",
"type": "text",
"language": "en"
}
]
},
{
"type": "request-start",
"contents": [
{
"text": "Por favor, espere mientras lo reviso por usted.",
"type": "text",
"language": "es"
}
]
}
],
However when running on callid "b3271bc5-d6c2-4a62-a615-07fb0d937c7f", im getting this transcript:
This is Rosa. How can I help you?

User
Hola, ¿puedo reservar una cita para el próximo viernes a las siete de la noche?

AI
Let me check on that for you.

AI
Lo siento. No tengo disponibilidad a las siete PM el viernes siete de febrero. Pero podría acomodarte a las tres pm ese mismo día.
This is Rosa. How can I help you?

User
Hola, ¿puedo reservar una cita para el próximo viernes a las siete de la noche?

AI
Let me check on that for you.

AI
Lo siento. No tengo disponibilidad a las siete PM el viernes siete de febrero. Pero podría acomodarte a las tres pm ese mismo día.
Can you explain where I can broadcast the "user's language contents"
deep-jade
deep-jade8mo ago
@Sal 🔵 19:06:03:446 Say Request undefined But en Active So Speaking 29. (requested: "undefined", new: "Let me check on that for you.") As you can see the model detected the current active language as english, which resulted into using Let me check on that for you. can you try out 2-3 calls to validate the feature working for you? Lastly can you explain what do you mean by where I can broadcast the "user's language contents"?
fair-rose
fair-rose6mo ago
Hello. Can you tell me how do I modify the tool message contents array as you describe? I am using VAPI interface at the moment which does not give you this possibility.
metropolitan-bronze
metropolitan-bronze3w ago
Was this resolved? We set different contents for different languages and are using a multi-lingual transcription model. But it is always picking the english tool message

Did you find this page helpful?