This commit is contained in:
Jicheng Lu 2025-10-09 17:43:29 -05:00
parent 282773ba5c
commit c1a9de4a04
14 changed files with 23 additions and 23 deletions

View file

@ -11,22 +11,22 @@
</PropertyGroup>
<ItemGroup>
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-image-generate_image.json">
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-file-generate_image.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-image-generate_image.fn.liquid">
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-file-generate_image.fn.liquid">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-image-read_image.json">
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-file-read_image.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-image-read_image.fn.liquid">
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-file-read_image.fn.liquid">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-image-edit_image.json">
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-file-edit_image.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-image-edit_image.fn.liquid">
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-file-edit_image.fn.liquid">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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<AgentUtility> 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

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -0,0 +1 @@
Please call util-file-edit_image if user wants to edit, change or modify an image in the conversation.

View file

@ -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.

View file

@ -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.

View file

@ -1 +0,0 @@
Please call util-image-edit_image if user wants to edit, change or modify an image in the conversation.

View file

@ -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.

View file

@ -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.