BotSharp/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.Summary.cs

33 lines
912 B
C#
Raw Normal View History

2024-05-27 01:40:24 +00:00
using BotSharp.Abstraction.Infrastructures.Enums;
using BotSharp.Abstraction.Templating;
namespace BotSharp.Core.Conversations.Services;
public partial class ConversationService
{
public async Task<string> GetConversationSummary(string conversationId)
{
if (string.IsNullOrEmpty(conversationId)) return string.Empty;
var dialogs = _storage.GetDialogs(conversationId);
return string.Empty;
}
private IEnumerable<string> BuildConversationContent(List<RoleDialogModel> dialogs)
{
}
private string GetPrompt(Agent router, List<RoleDialogModel> dialogs)
{
var template = router.Templates.First(x => x.Name == "conversation.summary").Content;
var render = _services.GetRequiredService<ITemplateRender>();
return render.Render(template, new Dictionary<string, object>
{
{ "conversation", }
});
}
}