How to invoke a prompt with chat history? #9773
-
Hi, In an application, I want to invoke a prompt with chat history. The idea is to generate follow-up prompts that the user can try based on the response from a model to the user's request (which might have involved tool calling as well) and the chat history so far. I looked at the documentation for InvokePromptAsync but couldn't find any details on if we can pass the chat history or not, or if it already takes any chat history into account. Is it possible to achieve this with InvokePromptAsync? If not, how can I use chat completions via ChatCompletionService? Since this is sort of a task that happens in the background and is not user facing, I ideally do not want to create a plugin for this. I would really appreciate it if someone can help me out. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Adding @markwallace-microsoft |
Beta Was this translation helpful? Give feedback.
-
Hi @MalayAgr |
Beta Was this translation helpful? Give feedback.
Hi @MalayAgr
here are some examples showing how to do this: