kwkrass
04/25/2024, 12:39 PMVapi Support
04/25/2024, 12:39 PMVapi Support
04/25/2024, 12:40 PM.send()
method from the SDK can be a way to interact with your assistant dynamically. Specifically, you can use this method to send text messages to the assistant during a session, including results from asynchronous operations that your backend might perform. The assistant will react to these messages as part of the conversation. This approach is documented in the Vapi Web SDK, where you can send intermediate messages to the assistant, such as updating the chat with the results of your research when ready [(1)]() [(2)]() .
However, to directly send information from your backend to a running assistant via an API, the detailed documentation does not explicitly outline a direct API endpoint for injecting messages into an active assistant session. The primary interactions with assistants through the API involve creating, updating, getting, and deleting assistants [(3)]() [(4)]() [(5)]() [(6)]() .
For backend-to-assistant communication reflecting the results of asynchronous research or tasks, you might consider utilizing webhook events or server URL configurations where your server can respond to requests from the assistant for updated information or function calls during a conversation. This mechanism supports asynchronous operations where the assistant can request information, and your server provides responses when the data is ready [(7)]() .
In summary, while .send()
in the SDK can be used for updating an ongoing session with new messages from the client-sVapi Support
04/25/2024, 12:42 PMkwkrass
04/25/2024, 12:44 PMSahil
04/25/2024, 12:44 PMkwkrass
04/25/2024, 12:45 PMkwkrass
04/25/2024, 12:51 PMSahil
04/25/2024, 12:54 PMSahil
04/25/2024, 12:55 PMkwkrass
04/25/2024, 1:04 PMSahil
04/25/2024, 1:32 PMkwkrass
04/25/2024, 1:40 PMkwkrass
04/25/2024, 1:40 PM