API Reference
Reference documentation for Ponder
PonderProvider
You can integrate Ponder into your application by wrapping your app in the PonderProvider
. This is usually done in the _app.js
file, but depends on your react framework.
Params
ID of the assistant you created on Ponder dashboard
address of Ponder’s backend server
a list of paths where the Ponder widget should be rendered. If not provided then render everywhere
text to display as heading
text to display as sub heading
main background color of the widget
text and accent color of the widget
path to the image file of the company logo
if true then the Ponder widget will NOT be rendered and its upto you to build a custom UI for the agent using the usePonder hooks
usePonder
The usePonder
hook exposes the core functionality of Ponder. You can access it on any component that is a child of the PonderProvider
Returns
show / hide the Ponder widget on the bottom right, not applicable in headless mode
starts a web call
stops a web call
callback function called when the call is connected and the agent is listening
callback function called when the call is disconnected and the agent is no longer listening
lets you set the instructions and context of the agent dynamically
lets you set the functions that the agent can call
callback function for whenever user speech start is detected
does not have any arguments
callback function for whenever user is done speaking
does not have any arguments
callback for whenever there is a new message added to the conversation
for example when the user’s speech is transcribed, or when the agent’s response is recieved
callback for whenever the agent decides to call a function
has the name
- function name and args
- arguments of the function as parameters