-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMessagesTemplateNode.cs
More file actions
26 lines (24 loc) · 898 Bytes
/
MessagesTemplateNode.cs
File metadata and controls
26 lines (24 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
using System.Collections.Generic;
namespace LLTSharp
{
/// <summary>
/// The base class for all messages template nodes used for rendering prompts based on templates.
/// </summary>
public abstract class MessagesTemplateNode
{
/// <summary>
/// Renders the template node based on the provided data.
/// </summary>
/// <param name="context">The context accessor containing the data to render.</param>
/// <returns>A collection of messages representing the rendered template node.</returns>
public abstract IEnumerable<Message> Render(TemplateContextAccessor context);
/// <summary>
/// Refines the template after parsing an AST to remove indents and unnecessary leading/trailing whitespaces.
/// </summary>
/// <param name="depth">The current depth of refinement. Used for indentation purposes.</param>
public virtual void Refine(int depth)
{
}
}
}