VapiAI / python

MIT License
59 stars 25 forks source link

add_send_text_message #10

Closed venkatram-dev closed 3 weeks ago

venkatram-dev commented 3 weeks ago

To send text messages to the assistant aside from the audio input using the send method and passing appropriate role and content.


vapi = Vapi(api_key=key)

vapi.start(assistant_id='xxx')

time.sleep(5)

vapi.add_message('user', 'Can you explain VAPI in one sentence?')

time.sleep(15)

vapi.stop()

We can look at few results here

https://dashboard.vapi.ai/calls/e40c730f-87dc-42a1-82f0-bce53697150c

https://dashboard.vapi.ai/calls/dd35f893-99dd-4366-a2a8-23c9ac04c5c9

Here is a screenshot of the message from vapi call logs.

Screenshot 2024-08-21 at 9 38 58 PM

nikhilro commented 3 weeks ago

thanks!