BotSharp/src/Plugins/BotSharp.Plugin.FileHandler/FileHandlerPlugin.cs

26 lines
946 B
C#
Raw Normal View History

2024-07-16 17:08:37 +00:00
using BotSharp.Plugin.FileHandler.Hooks;
using Microsoft.Extensions.Configuration;
2024-07-16 22:46:22 +00:00
namespace BotSharp.Plugin.FileHandler;
2024-07-16 17:08:37 +00:00
public class FileHandlerPlugin : IBotSharpPlugin
{
public string Id => "65be5aee-48df-4ff8-a50a-05c8bcd2a793";
public string Name => "File Handler";
public string Description => "AI reads files, such as image, pdf, excel";
public string IconUrl => "https://lirp.cdn-website.com/6f8d6d8a/dms3rep/multi/opt/API_Icon-640w.png";
public string[] AgentIds => [];
public void RegisterDI(IServiceCollection services, IConfiguration config)
{
services.AddScoped(provider =>
{
var settingService = provider.GetRequiredService<ISettingService>();
return settingService.Bind<FileHandlerSettings>("FileHandler");
});
2024-07-16 19:13:29 +00:00
services.AddScoped<IAgentHook, FileHandlerHook>();
2024-07-16 17:08:37 +00:00
services.AddScoped<IAgentUtilityHook, FileHandlerUtilityHook>();
}
2024-07-16 19:13:29 +00:00
}