From 102a0edc3e414810ce911a2391ba1f612eef8d4b Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Thu, 6 Jun 2024 23:16:40 -0500 Subject: [PATCH] minor change --- .../BotSharp.Core/Files/Functions/LoadAttachmentFn.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }