From c1a9de4a048ae5ff3dbac4fbc143df75d1070c00 Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Thu, 9 Oct 2025 17:43:29 -0500 Subject: [PATCH] revert --- .../BotSharp.Plugin.ImageHandler.csproj | 12 ++++++------ .../Functions/EditImageFn.cs | 2 +- .../Functions/GenerateImageFn.cs | 2 +- .../Functions/ReadImageFn.cs | 2 +- .../Hooks/ImageHandlerUtilityHook.cs | 12 ++++++------ ...age-edit_image.json => util-file-edit_image.json} | 2 +- ...rate_image.json => util-file-generate_image.json} | 2 +- ...age-read_image.json => util-file-read_image.json} | 2 +- .../templates/util-file-edit_image.fn.liquid | 1 + .../templates/util-file-generate_image.fn.liquid | 2 ++ .../templates/util-file-read_image.fn.liquid | 2 ++ .../templates/util-image-edit_image.fn.liquid | 1 - .../templates/util-image-generate_image.fn.liquid | 2 -- .../templates/util-image-read_image.fn.liquid | 2 -- 14 files changed, 23 insertions(+), 23 deletions(-) rename src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/{util-image-edit_image.json => util-file-edit_image.json} (91%) rename src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/{util-image-generate_image.json => util-file-generate_image.json} (90%) rename src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/{util-image-read_image.json => util-file-read_image.json} (96%) create mode 100644 src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-file-edit_image.fn.liquid create mode 100644 src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-file-generate_image.fn.liquid create mode 100644 src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-file-read_image.fn.liquid delete mode 100644 src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-image-edit_image.fn.liquid delete mode 100644 src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-image-generate_image.fn.liquid delete mode 100644 src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-image-read_image.fn.liquid diff --git a/src/Plugins/BotSharp.Plugin.ImageHandler/BotSharp.Plugin.ImageHandler.csproj b/src/Plugins/BotSharp.Plugin.ImageHandler/BotSharp.Plugin.ImageHandler.csproj index ee344a0f..fc2f33bd 100644 --- a/src/Plugins/BotSharp.Plugin.ImageHandler/BotSharp.Plugin.ImageHandler.csproj +++ b/src/Plugins/BotSharp.Plugin.ImageHandler/BotSharp.Plugin.ImageHandler.csproj @@ -11,22 +11,22 @@ - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest - + PreserveNewest diff --git a/src/Plugins/BotSharp.Plugin.ImageHandler/Functions/EditImageFn.cs b/src/Plugins/BotSharp.Plugin.ImageHandler/Functions/EditImageFn.cs index e493f130..b59eb2c0 100644 --- a/src/Plugins/BotSharp.Plugin.ImageHandler/Functions/EditImageFn.cs +++ b/src/Plugins/BotSharp.Plugin.ImageHandler/Functions/EditImageFn.cs @@ -4,7 +4,7 @@ namespace BotSharp.Plugin.ImageHandler.Functions; public class EditImageFn : IFunctionCallback { - public string Name => "util-image-edit_image"; + public string Name => "util-file-edit_image"; public string Indication => "Editing image"; private readonly IServiceProvider _services; diff --git a/src/Plugins/BotSharp.Plugin.ImageHandler/Functions/GenerateImageFn.cs b/src/Plugins/BotSharp.Plugin.ImageHandler/Functions/GenerateImageFn.cs index cd733260..8ce7e8f9 100644 --- a/src/Plugins/BotSharp.Plugin.ImageHandler/Functions/GenerateImageFn.cs +++ b/src/Plugins/BotSharp.Plugin.ImageHandler/Functions/GenerateImageFn.cs @@ -2,7 +2,7 @@ namespace BotSharp.Plugin.ImageHandler.Functions; public class GenerateImageFn : IFunctionCallback { - public string Name => "util-image-generate_image"; + public string Name => "util-file-generate_image"; public string Indication => "Generating image"; private readonly IServiceProvider _services; diff --git a/src/Plugins/BotSharp.Plugin.ImageHandler/Functions/ReadImageFn.cs b/src/Plugins/BotSharp.Plugin.ImageHandler/Functions/ReadImageFn.cs index 8820ff55..236e9f60 100644 --- a/src/Plugins/BotSharp.Plugin.ImageHandler/Functions/ReadImageFn.cs +++ b/src/Plugins/BotSharp.Plugin.ImageHandler/Functions/ReadImageFn.cs @@ -4,7 +4,7 @@ namespace BotSharp.Plugin.ImageHandler.Functions; public class ReadImageFn : IFunctionCallback { - public string Name => "util-image-read_image"; + public string Name => "util-file-read_image"; public string Indication => "Reading images"; private readonly IServiceProvider _services; diff --git a/src/Plugins/BotSharp.Plugin.ImageHandler/Hooks/ImageHandlerUtilityHook.cs b/src/Plugins/BotSharp.Plugin.ImageHandler/Hooks/ImageHandlerUtilityHook.cs index 1a0f7b38..36853aa8 100644 --- a/src/Plugins/BotSharp.Plugin.ImageHandler/Hooks/ImageHandlerUtilityHook.cs +++ b/src/Plugins/BotSharp.Plugin.ImageHandler/Hooks/ImageHandlerUtilityHook.cs @@ -2,9 +2,9 @@ namespace BotSharp.Plugin.ImageHandler.Hooks; public class ImageHandlerUtilityHook : IAgentUtilityHook { - private const string READ_IMAGE_FN = "util-image-read_image"; - private const string GENERATE_IMAGE_FN = "util-image-generate_image"; - private const string EDIT_IMAGE_FN = "util-image-edit_image"; + private const string READ_IMAGE_FN = "util-file-read_image"; + private const string GENERATE_IMAGE_FN = "util-file-generate_image"; + private const string EDIT_IMAGE_FN = "util-file-edit_image"; public void AddUtilities(List utilities) { @@ -12,7 +12,7 @@ public class ImageHandlerUtilityHook : IAgentUtilityHook { new AgentUtility { - Category = "image", + Category = "file", Name = UtilityName.ImageReader, Items = [ new UtilityItem @@ -24,7 +24,7 @@ public class ImageHandlerUtilityHook : IAgentUtilityHook }, new AgentUtility { - Category = "image", + Category = "file", Name = UtilityName.ImageGenerator, Items = [ new UtilityItem @@ -36,7 +36,7 @@ public class ImageHandlerUtilityHook : IAgentUtilityHook }, new AgentUtility { - Category = "image", + Category = "file", Name = UtilityName.ImageEditor, Items = [ new UtilityItem diff --git a/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-image-edit_image.json b/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-file-edit_image.json similarity index 91% rename from src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-image-edit_image.json rename to src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-file-edit_image.json index 5392c6f1..84a32e56 100644 --- a/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-image-edit_image.json +++ b/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-file-edit_image.json @@ -1,5 +1,5 @@ { - "name": "util-image-edit_image", + "name": "util-file-edit_image", "description": "If the user requests you editting or changing an image or a picture, you can call this function to edit an image.", "parameters": { "type": "object", diff --git a/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-image-generate_image.json b/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-file-generate_image.json similarity index 90% rename from src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-image-generate_image.json rename to src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-file-generate_image.json index 014eb436..ba96aef0 100644 --- a/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-image-generate_image.json +++ b/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-file-generate_image.json @@ -1,5 +1,5 @@ { - "name": "util-image-generate_image", + "name": "util-file-generate_image", "description": "If the user requests you providing or generating image or picture, you can call this function to generate image.", "parameters": { "type": "object", diff --git a/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-image-read_image.json b/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-file-read_image.json similarity index 96% rename from src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-image-read_image.json rename to src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-file-read_image.json index 7e1efae5..57a6d90d 100644 --- a/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-image-read_image.json +++ b/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/functions/util-file-read_image.json @@ -1,5 +1,5 @@ { - "name": "util-image-read_image", + "name": "util-file-read_image", "description": "If the user's request is related to describing or analyzing images, you can call this function to analyze images.", "parameters": { "type": "object", diff --git a/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-file-edit_image.fn.liquid b/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-file-edit_image.fn.liquid new file mode 100644 index 00000000..54b722c9 --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-file-edit_image.fn.liquid @@ -0,0 +1 @@ +Please call util-file-edit_image if user wants to edit, change or modify an image in the conversation. \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-file-generate_image.fn.liquid b/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-file-generate_image.fn.liquid new file mode 100644 index 00000000..fcbae06a --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-file-generate_image.fn.liquid @@ -0,0 +1,2 @@ +** Please call util-file-generate_image if user wants you to provide or generate an image or picture. +** Please do not call util-file-generate_image, if user does not generate image explicitly or wants to change or edit the existing image. \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-file-read_image.fn.liquid b/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-file-read_image.fn.liquid new file mode 100644 index 00000000..c245d21d --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-file-read_image.fn.liquid @@ -0,0 +1,2 @@ +Please call function util-file-read_image if user wants to describe an image or images. +You can also call function util-file-read_image to access the image or images that user uploaded. \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-image-edit_image.fn.liquid b/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-image-edit_image.fn.liquid deleted file mode 100644 index 7ddaeb60..00000000 --- a/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-image-edit_image.fn.liquid +++ /dev/null @@ -1 +0,0 @@ -Please call util-image-edit_image if user wants to edit, change or modify an image in the conversation. \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-image-generate_image.fn.liquid b/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-image-generate_image.fn.liquid deleted file mode 100644 index 788317c0..00000000 --- a/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-image-generate_image.fn.liquid +++ /dev/null @@ -1,2 +0,0 @@ -** Please call util-image-generate_image if user wants you to provide or generate an image or picture. -** Please do not call util-image-generate_image, if user does not generate image explicitly or wants to change or edit the existing image. \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-image-read_image.fn.liquid b/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-image-read_image.fn.liquid deleted file mode 100644 index 1115ef15..00000000 --- a/src/Plugins/BotSharp.Plugin.ImageHandler/data/agents/6745151e-6d46-4a02-8de4-1c4f21c7da95/templates/util-image-read_image.fn.liquid +++ /dev/null @@ -1,2 +0,0 @@ -Please call function util-image-read_image if user wants to describe an image or images. -You can also call function util-image-read_image to access the image or images that user uploaded. \ No newline at end of file