Not trigger if replyMessage.FunctionName is empty.

This commit is contained in:
Haiping Chen 2024-03-27 11:19:13 -05:00
parent de2f4ee5b1
commit 280330bd33
2 changed files with 4 additions and 1 deletions

View file

@ -48,6 +48,9 @@ public class RoleDialogModel : ITrackableMessage
[JsonIgnore(Condition = JsonIgnoreCondition.Always)]
public string ImageUrl { get; set; }
/// <summary>
/// Remember to set Message.Content as well
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public RichContent<IRichMessage>? RichContent { get; set; }

View file

@ -53,7 +53,7 @@ public partial class ConversationService
hook.SetAgent(agent)
.SetConversation(conversation);
if (replyMessage == null)
if (replyMessage == null || string.IsNullOrEmpty(replyMessage.FunctionName))
{
await hook.OnMessageReceived(message);
}