HumeAI / empathic-voice-api-js

Packages for using EVI with JavaScript, React, or as a Widget
https://empathic-voice-api-js-next-app.vercel.app
16 stars 10 forks source link

Is there a way to update the system prompt in the react sdk? #218

Closed akdeb closed 5 months ago

akdeb commented 5 months ago

Does @humeai/voice-react have an easy way of updating the system prompt? Couldn't find it in the docs and the index.d.ts

zachkrall commented 5 months ago

Hi @akdeb! You can pass a sessionSettings object to VoiceProvider to change the system prompt.

<VoiceProvider
    auth={{ 
        type: 'apiKey', 
        value: apiKey
    }}
    sessionSettings={{
        'systemPrompt': 'YOUR SYSTEM PROMPT HERE'
    }}
>
</VoiceProvider>

You can find other possible values for sessionSettings here: https://dev.hume.ai/reference/empathic-voice-interface-evi/chat/chat#send

Edit: I hope this also addresses your question in https://github.com/HumeAI/hume-evi-next-js-starter/issues/2

akdeb commented 5 months ago

Makes sense thanks @zachkrall!