commit
6da2d622f6
|
|
@ -41,10 +41,10 @@ public partial class ConversationService
|
|||
var template = agent.Templates.First(x => x.Name == "conversation.summary").Content;
|
||||
var render = _services.GetRequiredService<ITemplateRender>();
|
||||
|
||||
var texts = string.Empty;
|
||||
var texts = new List<string>();
|
||||
for (int i = 0; i < contents.Count; i++)
|
||||
{
|
||||
texts += $"[Conversation {i+1}]\r\n{contents[i]}";
|
||||
texts.Add($"{contents[i]}");
|
||||
}
|
||||
|
||||
return render.Render(template, new Dictionary<string, object>
|
||||
|
|
|
|||
|
|
@ -4,11 +4,13 @@ Please read each conversation in the [CONVERSATIONS] section and provide a summa
|
|||
** Please do not respond to the latest conversation.
|
||||
** If there are different topics in the conversations, please summarize each topic in different sentences and list them in bullets.
|
||||
* Please use concise sentences to summarize each topic.
|
||||
* Please do not exceed 32 words when summarizing each topic.
|
||||
* Please do not include excessive details in the summaries.
|
||||
* Please use 'user' instead of 'you', 'he' or 'she'.
|
||||
|
||||
[CONVERSATIONS]
|
||||
|
||||
{% for text in texts -%}
|
||||
[CONVERSATION]
|
||||
{{ text }}{{ "\r\n" }}
|
||||
{%- endfor %}
|
||||
Loading…
Reference in a new issue