The call does not apply my model configuration
# support
d
Hi everyone, I am implementing VAPI to make phone calls, I have started configuring my model with the information I need, then I made the test from the VAPI page using the wizard and it works correctly. Now when I want to make the call from JavaScript it does it correctly but it does not respond with the information I have in my model, I have configured my model to speak in Spanish and when I receive the call the wizard speaks in English and then the call is cut, I have already checked the wizard id and everything is correct. What can it be? https://cdn.discordapp.com/attachments/1289458206019424267/1289458206493376543/image.png?ex=66f8e509&is=66f79389&hm=c93912bdaebf9f464b67cd6af87d05635ecc3740d4087457aa9b895c62a578d9& https://cdn.discordapp.com/attachments/1289458206019424267/1289458206774530060/image.png?ex=66f8e509&is=66f79389&hm=7dcc961f1046fad3d7366ee3edf603a0ba37cbe334098402e98a2c4cff4b3134&
v
@Danilo Martinez Hello! It's great to hear that you've successfully tested making phone calls using the VAPI wizard and that you're now implementing it in JavaScript. If the call is being made correctly but the language and responses are not as expected, there are a few things we can check: 1. **Language Configuration**: Ensure that the language is set correctly in your JavaScript code. You might need to specify the language parameter when making the API call. 2. **Model Configuration**: Double-check that the model you've configured for Spanish is being referenced correctly in your JavaScript code. There might be an issue with the model ID or the endpoint you're hitting. 3. **API Request**: Review the API request you're sending from JavaScript. Make sure that all necessary parameters, including the wizard ID and language settings, are included and properly formatted. 4. **Error Handling**: Implement error handling in your JavaScript code to catch any issues during the API call. This can provide more insight into what might be going wrong. 5. **Documentation**: Refer to the VAPI documentation for examples and guidelines on how to make calls with the correct language settings from JavaScript. If you've already checked these and the issue persists, it might be helpful to see the actual JavaScript code you're using to make the call. This way, I can provide more targeted assistance. If you're not comfortable sharing your code here, you can always reach out to our support team for more in-depth help. Would you like to proceed with sharing your code snippet or contact support?
You can continue this conversation by mentioning me in the message.
d
@Vapi I have already checked all the steps you have told me but I still have the problem. I share my code with you: async function fntLlamar(e) { const options = { method: 'POST', headers: { Authorization: 'Bearer **************************', 'Content-Type': 'application/json' }, body: JSON.stringify({ name: "Maria Nallam", assistantId: "795d3dc2-ee05-4175-b2c7-******", customer: { name: "Danilo Martínez", // Nombre del cliente number: "**************************'," // Número de teléfono del cliente en formato E.164 }, phoneNumber: { twilioPhoneNumber: "**************************',", // Número de Twilio en formato E.164 twilioAccountSid: "**************************',", // SID de Twilio twilioAuthToken: "**************************'," // Token de autenticación de Twilio }, }) }; fetch('https://api.vapi.ai/call', options) .then(response => { if (!response.ok) { throw new Error('Error en la solicitud: ' + response.statusText); } return response.json(); }) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); }
s
@Danilo Martinez can you share call id.
d
@Shubham Bajaj thank you for answering, I attach an image of the last calls you made and I will pass here the last id of today's call. ec4e88f5-4967-4a97-a807-86667f25edf8 https://cdn.discordapp.com/attachments/1289458206019424267/1289664049923096658/image.png?ex=66f9a4be&is=66f8533e&hm=359b199b39f4af60f8d25affc7dbf2862104440f5a43bd45a2fc5175c18083b2&
s
🔵 19:05:59:700 Call
ec4e88f5-4967-4a97-a807-86667f25edf8
Waited 300s But Transport Never Connected.
can you share a working call id.
d
@Shubham Bajaj I pass you this call id that appears in the log that has worked ff6f0558-9b07-4c47-82df-b5e105170b04 also I pass you another one that I have made from the web in case you need it a9d7e2fa-f05a-4a4a-9b94-529eeb23565c https://cdn.discordapp.com/attachments/1289458206019424267/1290586347655921675/image.png?ex=66fcffb3&is=66fbae33&hm=4e59921f42052ef82fef3926b15b710ae2cd3765f30a0d0658ae9d6d6bcef430&
Hi @Shubham Bajaj I'm Danilo Martinez a moment ago we had a meeting with Fabrizio and you to see the details of VAPI, the idea is that we can hire the service but first we need to assemble this DEMO that we are currently working on so we can make a presentation to the bosses and convince them. The error I currently have is that apparently the VAPI model is not linked to the call I make, when I answer the call it says “press a button to start the conversation” I press it. Then the assistant speaks to me but it is not the same voice that I have configured in my model because in the API is not available that voice, also the information that I have in my model is not reflected when the assistant speaks to me. What can it be? this is the id of the call 299e8d79-360a-49a5-b8f8-62adc8867ac5 https://cdn.discordapp.com/attachments/1289458206019424267/1291126514171252736/image.png?ex=66fef6c4&is=66fda544&hm=ced167e04a247bbafdff0263c2af277ba1f3ec51eeb85e7c621f2e8576cc3172&
async function fntLlamar(e) { console.log("Iniciando la función fntLlamar"); const options = { method: 'POST', headers: { Authorization: 'Bearer b7455ae5-d0f5-42e5-b8eb-c2e41af30832', 'Content-Type': 'application/json' }, body: JSON.stringify({ name: "Maria Nallam", assistantId: "795d3dc2-ee05-4175-b2c7-+++", customer: { name: "Danilo Martínez", number: "+595972905+++" }, phoneNumber: { twilioPhoneNumber: "+1213+++", twilioAccountSid: "AC2c52c47b1c40cd6f7e74f162+++", twilioAuthToken: "79a66dc8a73456cdddc631+++" }, assistant: { transcriber: { provider: "deepgram", model: "nova-2", language: "es", smartFormat: false, languageDetectionEnabled: false, keywords: [] }, model: { messages: [ { content: "Hola, soy Maria Nallam. ¿En qué puedo ayudarte hoy?", role: "assistant" } ], toolIds: ["2b67bb1a-ec35-424a-8d00-d2a+++"], provider: "openai", model: "gpt-3.5-turbo-16k", temperature: 0.7, knowledgeBase: { provider: "canonical", topK: 5, fileIds: ["ac6cc0ab-81c5-44ff-a72d-df+++"] }, }, voice: { provider: "11labs", voiceId: "andrea", }, firstMessageMode: "assistant-speaks-first" } }) }; fetch('https://api.vapi.ai/call', options) .then(response => { if (!response.ok) { throw new Error('Error en la respuesta: ' + response.status); } return response.json(); }) .then(response => { console.log('Respuesta de la API:', response); }) .catch(err => console.error('Error:', err)); }
The other problem I find is that although on the web I have the option of Carolina voice from the API does not give me that option to choose. Also clarify that I am still not getting a response from my model with the information currently trained with from the call. https://cdn.discordapp.com/attachments/1289458206019424267/1291240647138742292/image.png?ex=66ff6110&is=66fe0f90&hm=a477cb53d78e69fe55fd4ae1661f2156880ef87c0f29e3968a25642176b1e16b& https://cdn.discordapp.com/attachments/1289458206019424267/1291240647675871242/image.png?ex=66ff6110&is=66fe0f90&hm=d02dfd337028638ef340fdd6eb37b7ccc287e4d7a5631c94ee31bd636c337ac3&
s
you can pass the voice, these docs require update.
@Danilo Martinez try setting model to gpt-4o/gpt-4o-mini and temprature to 0.3.
Also for voice you can pass it using assistant overrides under voice parameters.
Let me know if your still facing any issues.
d
@Shubham Bajaj I have already solved the problem. Thank you very much anyway. Now I have another doubt, I am implementing the call with a Twilio number and when I receive the call first an answering machine speaks to me and after pressing a number I start talking to the VAPI model. Is this because I am using the free version or is there any additional configuration to prevent the answering machine from speaking?
s
@Danilo Martinez We are currently having an office hour, can you please join it? We will help you directly. https://discord.gg/WPQuUJkF?event=1290804148354416710
s
yeah its because of free twilio number. try using a paid subscription.
d
Hello @Shubham Bajaj , for the transcription I am using the provider Deepgram in Spanish language and the Nova 2 model. I have the following problem, for some special characters like the “@” and the “.” it does not translate it to Spanish. I have already tried giving instructions from the prompt but I can't find the solution. Is there any way to solve it?
I don't speak English so I don't join the meetings.
Is there any way to customize these characters or words?
a
How can we configure the language? As I see, there’s no option to choose a language which should be spoken by the voice and what’s happening is that even though I’m putting in the prompt which language he should speak often happening that for example German is mixed with English or with English accent.
No eso no puedes cambiar pero lo que puedes hacer es después cuando integras a GPT de Open AI pues dejar escribir el resumen y dictarle que escriba como es el sistema así lo reconoce y te escribirá como debe ser para que lo tengas en el CRM correctamente.
d
Gracias por responder @AiCallYu_JuanS., durante las llamadas que voy realizando es esencial que se recupere correctamente el correo electrónico del cliente ya que posterior a la llamada se le debe enviar más información al cliente al correo mencionado, por eso es que el asistente trata de verificar correctamente el correo del cliente repitiéndolo.
Hay alguna otra forma en que pueda comprobar que mi asistente ha registrado correctamente el correo del cliente?
s
checkout replacement array for replacing words before sending to voice provider. sample curl:
Copy code
curl --request POST \
  --url https://api.vapi.ai/assistant \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "voice": {
    "chunkPlan": {
      "formatPlan": {
        "enabled": true,
        "replacements": [
          {
            "type": "exact",
            "key": "dot",
            "value": "."
          },
          {
            "type": "exact",
            "key": "at",
            "value": "@"
          }
        ]
      }
    }
  }
}'
Also you can use deepgram keywords for keywords.
a
Eso es lo que yo también trato de descubrir porque ni en esta ni en otra plataforma sabe documentarlo siempre bien y hay errores entonces la solución que yo hasta aquí he encontrado es que agende la cita o la conversación Online y que sea mandatorio que deje su correo electrónico o si no de que tengas el número y si es que tienes la oportunidad de mandarle SMS entonces que después de la conversación instantáneamente reciba un SMS de tu parte en donde le pides el correo electrónico
d
Entiendo @AiCallYu_JuanS., por mi parte seguiré investigando un poco y cualquier solución que pueda encontrar te lo comparto. Desde ya muchas gracias por tu respuesta.
Right now I am using the model that I have configured in VAPI and from the API the only thing I do is to pass the id of the model so that it can use the configuration previously made, therefore this configuration does not work for me. https://cdn.discordapp.com/attachments/1289458206019424267/1292899758049857640/image.png?ex=67056a3b&is=670418bb&hm=86d27d0d8ec97b1ab1dfe94b9a15a0bd7d50ddda389689913dacea5d0d26aee8&
Ideally I would like to be able to configure it from the VAPI page, but as far as I can see there is no option available to do it. @Shubham Bajaj
s
update your assistant and apply the chunkPlan using this url: https://docs.vapi.ai/api-reference/assistants/update-assistant
@Danilo Martinez @AiCallYu_JuanS. Refrain from publicly sharing your credentials and tokens, as this could compromise your security. I have removed your message for the time being. Please exercise caution in the future. cc: @John George
j
you should also revoke your old Twilio Auth Token and use a new one in case it was compromised
4 Views