Update Vapi System Prompt During the call
# support
m
I want to update vapi system prompt during the call how can i acheive that ?
@Vapi
@Shubham Bajaj
v
@Mayank Sharma To update the VAPI system prompt during a call, you would typically need to use the appropriate API endpoint or function provided by the VAPI service. This might involve sending a command or making an API call with the new prompt text that you want to use. However, as a support bot, I don't have the capability to directly interact with the VAPI system or its calls. To achieve this, you would need to refer to the VAPI documentation for the specific method to update prompts during a call. If there's a specific function within the VAPI service that you need assistance with, please provide more details, and I'll do my best to guide you through the process. If you're looking for a function within the VAPI service to update the system prompt, please provide the name of the function or the action you want to perform, and I can assist you further. If you're unsure about the details, you may need to contact VAPI support for more information on how to update the system prompt during a call.
m
@Sahil
v
@Mayank Sharma To update the VAPI system prompt during a call, you would typically need to use the appropriate API method provided by VAPI to modify the prompt in real-time. This could involve sending a command to the VAPI service with the new prompt text or instructions. However, to provide you with the exact steps or code, I would need more information about the specific VAPI system you are using and the capabilities it offers for updating prompts during a call. If you can provide me with more details or the documentation for the VAPI system you're using, I'd be happy to assist you further!
You can continue this conversation by mentioning me in the message.
m
Copy code
index.js:338 Error: Duplicate DailyIframe instances are not allowed
    at new Z (daily-esm.js:7:105158)
    at Function.value (daily-esm.js:7:178423)
    at Vapi.start (vapi.js:96:1)
index.js:163 Error: Duplicate DailyIframe instances are not allowed
    at new Z (daily-esm.js:7:105158)
    at Function.value (daily-esm.js:7:178423)
    at Vapi.start (vapi.js:96:1)
api.js:53 

index.js:202 
{status: 400, data: {…}}
index.js:338 Error: Duplicate DailyIframe instances are not allowed
    at new Z (daily-esm.js:7:105158)
    at Function.value (daily-esm.js:7:178423)
    at Vapi.start (vapi.js:96:1)
index.js:163 Error: Duplicate DailyIframe instances are not allowed
    at new Z (daily-esm.js:7:105158)
    at Function.value (daily-esm.js:7:178423)
    at Vapi.start (vapi.js:96:1)
i get this error too many times
@Shubham Bajaj when updating the system message i dont want it to speak
how to do that ?
@Vapi
v
@Mayank Sharma It looks like you're encountering a couple of different issues here. Let's address them one by one: 1. **Error: Duplicate DailyIframe instances are not allowed**: This error suggests that your code is trying to create multiple instances of a DailyIframe object when only one instance is allowed at a time. To resolve this, you should ensure that you're not creating a new instance if one already exists. You might need to check your code for where
Vapi.start
is called and make sure it's only called once or properly cleaned up before creating a new instance. 2. **PUT https://sales-stack-web-staging.api.holofy.io/v1/browser/canvas/folder 400 (Bad Request)**: This is an HTTP error indicating that the request made to the server was malformed or incorrect in some way. You'll need to check the API documentation to ensure that your request is structured correctly and includes all the necessary data. 3. **Updating the system message without speaking**: If you want to update the system message without having it spoken out loud, you would typically need to adjust the settings or parameters in your API call or the VAPI configuration. This might involve setting a parameter that controls whether the message is spoken or not. Without specific details about the VAPI system you're using, I can't provide exact instructions. However, you should look for parameters related to text-to-speech (TTS) functionality in your VAPI documentation and see if there's a way to update the message silently. If you're still having trouble, please provide more context or check the VAPI documentation for more details on how to update system messages without speaking. If there's a specific function you need to call to achieve this, please let me know, and I can assist you further.
m
if i keep on mute for sometime the call ends automatically
i dont know why
Copy code
{
  "action": "error",
  "errorMsg": "Meeting has ended",
  "error": {
    "type": "no-room",
    "msg": "Exiting meeting because room was deleted"
  },
  "callFrameId": "17248549890110.845122806552143"
}
kept idle
@Shubham Bajaj
@Sahil
s
you can use
/call/:id
endpoint with PATCH method.
the call ends because of silence time out but still share the call id. also it will be helpful if you can share what you have done till now.
m
if i have kept on mute it should actually stay alive
@Shubham Bajaj a168fa9c-1899-458c-999d-3f26367ff1f9
i am using package of vapi/web one
Copy code
vapiRef.current.send({
        type: 'add-message',
        message: {
          role: 'system',
          content: 'testing',
        },
      });
@Shubham Bajaj
Copy code
9aedc4cc-8dc0-49d8-ad99-63a3b8f4b659
this call id i muted vapi kept it idle for sometime then unmute its listening to me and generating the conversation array as well not responding with voice
@Vapi
v
@Mayank Sharma It seems like you're experiencing an issue where the call ends automatically due to a silence timeout, even though you want the call to remain active while it's on mute. The error message you're receiving indicates that the meeting has ended because the room was deleted, which might be a result of the silence timeout feature. To address this issue, you should: 1. Check the VAPI/Web package documentation or settings to see if there's a configuration option to disable the silence timeout or extend the timeout duration. This would prevent the call from ending prematurely when there's no audio activity. 2. Use the
/call/:id
endpoint with the PATCH method to update the call settings. Since you've provided the call ID
a168fa9c-1899-458c-999d-3f26367ff1f9
, you can make a PATCH request to
/call/a168fa9c-1899-458c-999d-3f26367ff1f9
with the appropriate payload to update the call settings. However, I would need more information about what specific settings you want to update to provide you with the correct payload. 3. Regarding the system message update without speaking, it looks like you're using the correct method to send a system message. If the VAPI is not responding with voice after unmuting, it could be related to the call being ended or another issue with the VAPI settings. Please ensure that you're following the VAPI/Web package documentation for handling mute/unmute states and updating call settings. If you're still facing issues, you may need to reach out to the VAPI support team for further assistance, as they would have more context on the specific configurations and behaviors of their system. If you have any specific actions you'd like me to perform or further questions, please let me know, and I'll do my best to assist you.
s
this call was ended by the customer and by default your
components.schemas.CreateAssistantDTO.properties.silenceTimeoutSeconds
is set to 30seconds. Try using 180 seconds or lesser.
šŸ”µ 08:56:38:619
user
Partial Transcript : as you can see was: 0.40400162 šŸ”µ 08:56:38:619 Conversation Buffer Outputted Data But Muted. (isBotMuted: true, isUserMuted: false) šŸ”µ 08:56:40:300
user
Final Transcript : deleted high.: 0.7656988 šŸ”µ 08:56:40:301 Conversation Buffer Outputted Data But Muted. (isBotMuted: true, isUserMuted: false) @Mayank Sharma as you can see bot was still on mute so that's why didn't responded which is opposite to recording/transcription can you check in your logs/events bot unmute event was triggered succesfully?
m
silenceTimeout max is 600
@Shubham Bajaj
vapi.setMuted(true);
there is only one way to mute , how to unmute the bot ?
@Shubham Bajaj how to setup inbound call for custom prompt ?
s
I am assuming you wanted to use dynamic assistant for inbound calling if that's the case then you have to use server event of type request assistant and then right before the call vapi will make a assistant type request to your server url asking for assistant config and then you can respond with custom prompt.
set mute to false.
vapi.setMuted(false)
m
that's why i am using to toggle the mic actually you said you can unmute the bot , if there is only one method true and false just indicates the condition right
s
let's connect over the call and resolve it. check your dm.
m
ok
10 Views