Improved prompting for attached images

This commit is contained in:
Thorsten Sommer 2025-12-29 17:32:31 +01:00
parent 011b3a8d04
commit 19cc1de84b
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -195,6 +195,14 @@ public sealed class ContentText : IContent
sb.AppendLine(await Program.RUST_SERVICE.ReadArbitraryFileData(document.FilePath, int.MaxValue));
sb.AppendLine("````");
}
var numImages = this.FileAttachments.Count(x => x is { IsImage: true, Exists: true });
if (numImages > 0)
{
sb.AppendLine();
sb.AppendLine($"Additionally, there are {numImages} image file(s) attached to this message. ");
sb.AppendLine("Please consider them as part of the message content and use them to answer accordingly.");
}
}
}
}