diff --git a/src/Infrastructure/BotSharp.Core/Files/Functions/LoadAttachmentFn.cs b/src/Infrastructure/BotSharp.Core/Files/Functions/LoadAttachmentFn.cs index 8dfb94b5..db3abff3 100644 --- a/src/Infrastructure/BotSharp.Core/Files/Functions/LoadAttachmentFn.cs +++ b/src/Infrastructure/BotSharp.Core/Files/Functions/LoadAttachmentFn.cs @@ -12,6 +12,7 @@ public class LoadAttachmentFn : IFunctionCallback private readonly ILogger _logger; private const string AIAssistant = "01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a"; private readonly IEnumerable _imageTypes = new List { "image", "images", "png", "jpg", "jpeg" }; + private readonly IEnumerable _pdfTypes = new List { "pdf" }; public LoadAttachmentFn( IServiceProvider services, @@ -89,7 +90,7 @@ public class LoadAttachmentFn : IFunctionCallback { parsed.Add(imageType); } - else if (type.IsEqualTo("pdf")) + else if (_pdfTypes.Any(x => type.IsEqualTo(x))) { parsed.Add(pdfType); }