Skip to content

Commit 800e535

Browse files
authored
Merge pull request #1185 from iceljc/features/add-image-llm-config
rename image handler utilities
2 parents e1dc28b + 6fcd360 commit 800e535

17 files changed

+37
-34
lines changed

src/Plugins/BotSharp.Plugin.ImageHandler/BotSharp.Plugin.ImageHandler.csproj

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,39 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<None Remove="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-file-compose_images.json" />
15-
<None Remove="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-file-compose_images.fn.liquid" />
14+
<None Remove="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-image-read_image.json" />
15+
<None Remove="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-image-read_image.fn.liquid" />
16+
<None Remove="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-image-generate_image.json" />
17+
<None Remove="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-image-generate_image.fn.liquid" />
18+
<None Remove="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-image-edit_image.json" />
19+
<None Remove="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-image-edit_image.fn.liquid" />
20+
<None Remove="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-image-compose_images.json" />
21+
<None Remove="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-image-compose_images.fn.liquid" />
1622
</ItemGroup>
1723

1824
<ItemGroup>
19-
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-file-compose_images.json">
25+
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-image-read_image.json">
2026
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
2127
</Content>
22-
</ItemGroup>
23-
24-
<ItemGroup>
25-
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-file-generate_image.json">
28+
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-image-read_image.fn.liquid">
2629
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
2730
</Content>
28-
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-file-compose_images.fn.liquid">
31+
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-image-generate_image.json">
2932
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
3033
</Content>
31-
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-file-generate_image.fn.liquid">
34+
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-image-generate_image.fn.liquid">
3235
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
3336
</Content>
34-
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-file-read_image.json">
37+
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-image-edit_image.json">
3538
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
3639
</Content>
37-
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-file-read_image.fn.liquid">
40+
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-image-edit_image.fn.liquid">
3841
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
3942
</Content>
40-
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-file-edit_image.json">
43+
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\functions\util-image-compose_images.json">
4144
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4245
</Content>
43-
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-file-edit_image.fn.liquid">
46+
<Content Include="data\agents\6745151e-6d46-4a02-8de4-1c4f21c7da95\templates\util-image-compose_images.fn.liquid">
4447
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4548
</Content>
4649
</ItemGroup>

src/Plugins/BotSharp.Plugin.ImageHandler/Functions/ComposeImageFn.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace BotSharp.Plugin.ImageHandler.Functions;
44

55
public class ComposeImageFn : IFunctionCallback
66
{
7-
public string Name => "util-file-compose_images";
7+
public string Name => "util-image-compose_images";
88
public string Indication => "Composing images";
99

1010
private readonly IServiceProvider _services;

src/Plugins/BotSharp.Plugin.ImageHandler/Functions/EditImageFn.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace BotSharp.Plugin.ImageHandler.Functions;
44

55
public class EditImageFn : IFunctionCallback
66
{
7-
public string Name => "util-file-edit_image";
7+
public string Name => "util-image-edit_image";
88
public string Indication => "Editing image";
99

1010
private readonly IServiceProvider _services;

src/Plugins/BotSharp.Plugin.ImageHandler/Functions/GenerateImageFn.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ namespace BotSharp.Plugin.ImageHandler.Functions;
22

33
public class GenerateImageFn : IFunctionCallback
44
{
5-
public string Name => "util-file-generate_image";
5+
public string Name => "util-image-generate_image";
66
public string Indication => "Generating image";
77

88
private readonly IServiceProvider _services;

src/Plugins/BotSharp.Plugin.ImageHandler/Functions/ReadImageFn.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace BotSharp.Plugin.ImageHandler.Functions;
44

55
public class ReadImageFn : IFunctionCallback
66
{
7-
public string Name => "util-file-read_image";
7+
public string Name => "util-image-read_image";
88
public string Indication => "Reading images";
99

1010
private readonly IServiceProvider _services;

src/Plugins/BotSharp.Plugin.ImageHandler/Hooks/ImageHandlerUtilityHook.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ namespace BotSharp.Plugin.ImageHandler.Hooks;
22

33
public class ImageHandlerUtilityHook : IAgentUtilityHook
44
{
5-
private const string READ_IMAGE_FN = "util-file-read_image";
6-
private const string GENERATE_IMAGE_FN = "util-file-generate_image";
7-
private const string EDIT_IMAGE_FN = "util-file-edit_image";
8-
private const string COMPOSE_IMAGES_FN = "util-file-edit_images";
5+
private const string READ_IMAGE_FN = "util-image-read_image";
6+
private const string GENERATE_IMAGE_FN = "util-image-generate_image";
7+
private const string EDIT_IMAGE_FN = "util-image-edit_image";
8+
private const string COMPOSE_IMAGES_FN = "util-image-compose_images";
99

1010
public void AddUtilities(List<AgentUtility> utilities)
1111
{
1212
var items = new List<AgentUtility>
1313
{
1414
new AgentUtility
1515
{
16-
Category = "file",
16+
Category = "image",
1717
Name = UtilityName.ImageReader,
1818
Items = [
1919
new UtilityItem
@@ -25,7 +25,7 @@ public void AddUtilities(List<AgentUtility> utilities)
2525
},
2626
new AgentUtility
2727
{
28-
Category = "file",
28+
Category = "image",
2929
Name = UtilityName.ImageGenerator,
3030
Items = [
3131
new UtilityItem
@@ -37,7 +37,7 @@ public void AddUtilities(List<AgentUtility> utilities)
3737
},
3838
new AgentUtility
3939
{
40-
Category = "file",
40+
Category = "image",
4141
Name = UtilityName.ImageEditor,
4242
Items = [
4343
new UtilityItem
@@ -49,7 +49,7 @@ public void AddUtilities(List<AgentUtility> utilities)
4949
},
5050
new AgentUtility
5151
{
52-
Category = "file",
52+
Category = "image",
5353
Name = UtilityName.ImageComposer,
5454
Items = [
5555
new UtilityItem
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "util-file-compose_images",
2+
"name": "util-image-compose_images",
33
"description": "Use multiple input images to compose a new scene or transfer the style from one image to another",
44
"parameters": {
55
"type": "object",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "util-file-edit_image",
2+
"name": "util-image-edit_image",
33
"description": "If the user requests you editting or changing an image or a picture, you can call this function to edit an image.",
44
"parameters": {
55
"type": "object",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "util-file-generate_image",
2+
"name": "util-image-generate_image",
33
"description": "If the user requests you providing or generating image or picture, you can call this function to generate image.",
44
"parameters": {
55
"type": "object",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "util-file-read_image",
2+
"name": "util-image-read_image",
33
"description": "If the user's request is related to describing or analyzing images, you can call this function to analyze images.",
44
"parameters": {
55
"type": "object",

0 commit comments

Comments
 (0)