VAPI voice and chat
# support
d
Hey guys, can i use both chat and voice for publishing in power platform for example ? I'm talking about an agent with knowledge base pdf files
v
Yes, you can enable both chat and voice for your agent using the Vapi Web Widget, which can be embedded in web-based platforms (including those surfaced in Power Platform via web embedding). Here’s a sample code snippet to add the widget with both modes:
Copy code
html
<!-- For chat mode -->
<vapi-widget public-key="your-public-key" assistant-id="your-assistant-id" mode="chat"></vapi-widget>

<!-- For voice mode -->
<vapi-widget public-key="your-public-key" assistant-id="your-assistant-id" mode="voice"></vapi-widget>
Just replace the keys and IDs with your own. For knowledge base support, ensure your assistant is configured with the relevant data in the Vapi dashboard. For more details, see the [Vapi Web Widget documentation](https://docs.vapi.ai/chat/web-widget). Source: - [Web widget](https://docs.vapi.ai/chat/web-widget)
d
But should the chat agent work as the voice agent regarding the knowledge base ?
Or it should not be as good as the voice agent ?