Skip to content

Pass context or customer details #228

Answered by prateeksachan
dev-orion-ps asked this question in Q&A
Discussion options

You must be logged in to vote

What you can do here is store the context in some persistent database and retrieve it back in the websocket connection once the call connects.

You can pass it while initiating the /call assuming the said variables are defined within curly bracets {} in the prompt and store it.

"some_context_data": {
    "name": "XYZ",
    "email": "[email protected]"
}

Once the websocket connection happens, you can retrieve this payload and pass it in the AssistantManager instance.
https://github.com/bolna-ai/bolna/blob/9842c50241c5bc0be5a5f9fb4bf43f49b365f1fe/local_setup/quickstart_server.py#L86-L88

It will then automatically inject and set the context_data.
https://github.com/bolna-ai/bolna/blob/9842c50241c5…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dev-orion-ps
Comment options

Answer selected by dev-orion-ps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants