Allow file attachments for assistants

This commit is contained in:
Thorsten Sommer 2025-12-30 13:44:10 +01:00
parent a4e523aec3
commit 7a47a2a450
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -217,12 +217,13 @@ public abstract partial class AssistantBase<TSettings> : AssistantLowerBase wher
return chatId;
}
protected DateTimeOffset AddUserRequest(string request, bool hideContentFromUser = false)
protected DateTimeOffset AddUserRequest(string request, bool hideContentFromUser = false, params List<FileAttachment> attachments)
{
var time = DateTimeOffset.Now;
this.lastUserPrompt = new ContentText
{
Text = request,
FileAttachments = attachments,
};
this.chatThread!.Blocks.Add(new ContentBlock