The Pria JavaScript SDK allows you to integrate AI digital twin capabilities directly into your website or Learning Management System (LMS) like Canvas. This guide covers both embedded integration and programmatic API usage.
displayOptions
object:
noUI: true
to use Pria programmatically without the visual interfaceCommand | Description | Parameters |
---|---|---|
post.message | Send text message to Pria | Array of strings |
convo.start | Start speech-to-speech conversation | None |
convo.stop | Stop speech-to-speech conversation | None |
assistants.list | Get available assistants | None |
pria.send()
function may throw these errors:
usage
property in responses indicates the total number of tokens consumed (input + output) for billing and monitoring purposes.
Issue | Solution |
---|---|
”Connect Pria first” error | Ensure SDK is loaded and initialized |
No responses received | Check if you’ve subscribed to responses |
Unauthorized errors | Verify user authentication and permissions |
Invalid JSON errors | Validate request format and structure |