semantic-kernel
semantic-kernel copied to clipboard
.Net: Add a function that accepts a chat history (or group chat) object and takes the last N messages
The following handlebars template should be possible...
{{messages (topNMessages chatHistory 20)}}
This would render the top 20 messages in the prompt template
I saw handlebars was deprecated, and also now all of use use native model plugins, I think we need a pass to pass history into plugin. And also system message
This can be done by creating a method and registering with the Kernel