Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ 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-compose_images";

public void AddUtilities(List<AgentUtility> utilities)
{
var items = new List<AgentUtility>
{
new AgentUtility
{
Category = "file",
Category = "image",
Name = UtilityName.ImageReader,
Items = [
new UtilityItem
Expand All @@ -25,7 +25,7 @@ public void AddUtilities(List<AgentUtility> utilities)
},
new AgentUtility
{
Category = "file",
Category = "image",
Name = UtilityName.ImageGenerator,
Items = [
new UtilityItem
Expand All @@ -37,7 +37,7 @@ public void AddUtilities(List<AgentUtility> utilities)
},
new AgentUtility
{
Category = "file",
Category = "image",
Name = UtilityName.ImageEditor,
Items = [
new UtilityItem
Expand All @@ -49,7 +49,7 @@ public void AddUtilities(List<AgentUtility> utilities)
},
new AgentUtility
{
Category = "file",
Category = "image",
Name = UtilityName.ImageComposer,
Items = [
new UtilityItem
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Please call util-image-edit_image if user wants to edit, change or modify an image in the conversation.
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
Loading