Replies: 2 comments 1 reply
-
Are you looking for something like the Copilot Chat: https://github.com/microsoft/semantic-kernel/tree/main/samples/apps/copilot-chat-app |
Beta Was this translation helpful? Give feedback.
1 reply
-
@alexchaomander can you take a look at this one. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Greetings.
Recently I was using Semantic Kernel to build an app for me. Basically with the help of the semantic function, I achieved a relatively low coupling project with independent semantic function that can be combined together. Thanks for the great job the team has done!
Now I am wondering if sk offers solution for a multi-round chat-based function? To be more specific, the semantic functions are independent with each other regarding to the conversation context with gpt-api. Consider a two step chat-based function that need the context awareness with some initial system instruction denoted as
${instruction}
:${user_Q}
which may contain some sk functions for prompt rendering, the messages field sent to the gpt-3.5-turbo api should be like:Then the api returns an answer denoted as
${Round_1_answer}
for as result of the first round query, the message recorded becomes:Now for the second round, the prompt is hard coded in system with the placeholder
blalalal {{$input}} blalala
which is the default key as the last function's result in the chain-of-function implementation. Now the messages field sent to the gpt-3.5-turbo api becomes:Finally the api's result in this round will be treated as result which will be returned to the user.
I tried with some walk arounds with the skfunction and ChatPromptTemplate but feel uncomfortable for the implementation.
Also maybe one can use a
{{$history}}
place holder update the history of the prompt, but this will easily transcend the token limitation. The split message list history can somehow escape the limitation.Is there any more elegant solution for this problem?
Many thanks! :)
Beta Was this translation helpful? Give feedback.
All reactions