Dear Community,
I created a PVA bot calling the OpenAI API to just to learn and have fun.
I started by asking user whether it's for text completion (ChatGPT style) or image generation (Dall.E-2 style) as two choices.
User choose one of the options. Then I will ask user to provide the prompt.
If user selected text, I will pass the prompt to a flow that calls Text completion API. If user selected image, I will pass the prompt to another flow that calls a Image generation API.
Results will be returned to the PVA window.
My question is, how do I keep user in the conversation without reset back to the beginning (asking for text or image) every time.
For example, when user are in the text completion and typed a first prompt, PVA calls the flow and returns the result. If user straight away types another words, they need to be considered another text prompt and calls the same flow. Unless user types the trigger phrases again, I'd to keep the user in the text flow. Vice versa, I like to keep the user in the image flow unless trigger phrases are detected.
I don't know how to do the loops correctly. Right now, after the flow returns the first result, if user follows with a second prompt, the PVA can't recognize it and doesn't know where to take the second prompt to.
Thanks.
Hi
This solution uses the preview version of Power virtual agents and hence cannot be used for production use cases - anyways this could be refactored to use the production version ?
Hi
This solution uses the preview version of Power virtual agents and hence cannot be used for production use cases - anyways this could be refactored to use the production version ?
I'm glad you found my articles useful! 🙂
Omg Henry that's exactly what I need. Thank you so much!
Hi @nhtkid,
Do these LinkedIn articles by Rémi Dyon help?
Part 2 seems to address your challenge with keeping context of the past questions.
Henry