rename image handler utilities

This commit is contained in:
Jicheng Lu 2025-10-14 20:53:20 -05:00
parent e1dc28beef
commit b8ecef3687
17 changed files with 37 additions and 34 deletions

View file

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

View file

@ -4,7 +4,7 @@ namespace BotSharp.Plugin.ImageHandler.Functions;
public class ComposeImageFn : IFunctionCallback
{
public string Name => "util-file-compose_images";
public string Name => "util-image-compose_images";
public string Indication => "Composing images";
private readonly IServiceProvider _services;

View file

@ -4,7 +4,7 @@ namespace BotSharp.Plugin.ImageHandler.Functions;
public class EditImageFn : IFunctionCallback
{
public string Name => "util-file-edit_image";
public string Name => "util-image-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-file-generate_image";
public string Name => "util-image-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-file-read_image";
public string Name => "util-image-read_image";
public string Indication => "Reading images";
private readonly IServiceProvider _services;

View file

@ -2,10 +2,10 @@ namespace BotSharp.Plugin.ImageHandler.Hooks;
public class ImageHandlerUtilityHook : IAgentUtilityHook
{
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";
private const string COMPOSE_IMAGES_FN = "util-file-edit_images";
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 COMPOSE_IMAGES_FN = "util-image-edit_images";
public void AddUtilities(List<AgentUtility> utilities)
{
@ -13,7 +13,7 @@ public class ImageHandlerUtilityHook : IAgentUtilityHook
{
new AgentUtility
{
Category = "file",
Category = "image",
Name = UtilityName.ImageReader,
Items = [
new UtilityItem
@ -25,7 +25,7 @@ public class ImageHandlerUtilityHook : IAgentUtilityHook
},
new AgentUtility
{
Category = "file",
Category = "image",
Name = UtilityName.ImageGenerator,
Items = [
new UtilityItem
@ -37,7 +37,7 @@ public class ImageHandlerUtilityHook : IAgentUtilityHook
},
new AgentUtility
{
Category = "file",
Category = "image",
Name = UtilityName.ImageEditor,
Items = [
new UtilityItem
@ -49,7 +49,7 @@ public class ImageHandlerUtilityHook : IAgentUtilityHook
},
new AgentUtility
{
Category = "file",
Category = "image",
Name = UtilityName.ImageComposer,
Items = [
new UtilityItem

View file

@ -1,5 +1,5 @@
{
"name": "util-file-compose_images",
"name": "util-image-compose_images",
"description": "Use multiple input images to compose a new scene or transfer the style from one image to another",
"parameters": {
"type": "object",

View file

@ -1,5 +1,5 @@
{
"name": "util-file-edit_image",
"name": "util-image-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-file-generate_image",
"name": "util-image-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-file-read_image",
"name": "util-image-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

@ -1 +0,0 @@
Please call util-file-compose_images if user wants to use multiple input images to compose a new scene or transfer the style from one image to another.

View file

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

View file

@ -1,2 +0,0 @@
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

@ -0,0 +1 @@
Please call util-image-compose_images if user wants to use multiple input images to compose a new scene or transfer the style from one image to another.

View file

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

View file

@ -1 +1 @@
** When the user explicitly requests you to generate an image about a specific subject, call util-file-generate_image.
** When the user explicitly requests you to generate an image about a specific subject, call util-image-generate_image.

View file

@ -0,0 +1,2 @@
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.