Added the ability to hide some AI responses

This commit is contained in:
Thorsten Sommer 2024-12-31 19:31:33 +01:00
parent 3828e2ad96
commit d9a9accd79
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -263,7 +263,7 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
return time; return time;
} }
protected async Task<string> AddAIResponseAsync(DateTimeOffset time) protected async Task<string> AddAIResponseAsync(DateTimeOffset time, bool hideContentFromUser = false)
{ {
var aiText = new ContentText var aiText = new ContentText
{ {
@ -278,6 +278,7 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
ContentType = ContentType.TEXT, ContentType = ContentType.TEXT,
Role = ChatRole.AI, Role = ChatRole.AI,
Content = aiText, Content = aiText,
HideFromUser = hideContentFromUser,
}; };
if (this.chatThread is not null) if (this.chatThread is not null)