Skip to content

Commit 7553fce

Browse files
committed
Add Template name to InstructResult
1 parent f4b669d commit 7553fce

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Infrastructure/BotSharp.Abstraction/Instructs/Models/InstructResult.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ public class InstructResult : ITrackableMessage
44
{
55
[JsonPropertyName("message_id")]
66
public string MessageId { get; set; }
7-
public string Text { get; set; }
7+
public string Text { get; set; } = string.Empty;
88
public object? Data { get; set; }
9+
[JsonPropertyName("template")]
10+
public string? Template{ get; set; }
911
public Dictionary<string, string>? States { get; set; } = new();
1012
}

src/Infrastructure/BotSharp.Core/Instructs/Services/InstructService.Execute.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ public async Task<InstructResult> Execute(string agentId, RoleDialogModel messag
6161

6262
var response = new InstructResult
6363
{
64-
MessageId = message.MessageId
64+
MessageId = message.MessageId,
65+
Template = templateName,
6566
};
6667

6768
if (completer is ITextCompletion textCompleter)

0 commit comments

Comments
 (0)