BotSharp/src/Plugins/BotSharp.Plugin.SqlDriver/SqlDriverPlugin.cs

28 lines
1.1 KiB
C#
Raw Normal View History

2024-09-17 11:32:11 +00:00
using BotSharp.Abstraction.Planning;
2024-01-18 11:30:28 +00:00
namespace BotSharp.Plugin.SqlDriver;
2024-01-13 21:17:40 +00:00
2024-01-18 11:30:28 +00:00
public class SqlDriverPlugin : IBotSharpPlugin
2024-01-13 21:17:40 +00:00
{
2024-01-18 11:30:28 +00:00
public string Id => "da7b6f7a-b1f0-455a-9939-ad2d493e929e";
public string Name => "SQL Driver";
2024-02-19 22:55:41 +00:00
public string Description => "Convert the user requirements into corresponding SQL statements";
public string IconUrl => "https://uxwing.com/wp-content/themes/uxwing/download/file-and-folder-type/sql-icon.png";
2024-01-13 21:17:40 +00:00
public void RegisterDI(IServiceCollection services, IConfiguration config)
{
2024-02-19 22:55:41 +00:00
services.AddScoped(provider =>
2024-01-13 21:17:40 +00:00
{
2024-02-19 22:55:41 +00:00
var settingService = provider.GetRequiredService<ISettingService>();
return settingService.Bind<SqlDriverSetting>("SqlDriver");
2024-01-13 21:17:40 +00:00
});
2024-02-19 22:55:41 +00:00
services.AddScoped<SqlDriverService>();
2024-09-03 20:41:12 +00:00
services.AddScoped<DbKnowledgeService>();
2024-02-19 22:55:41 +00:00
services.AddScoped<IKnowledgeHook, SqlDriverKnowledgeHook>();
2024-07-15 20:06:22 +00:00
services.AddScoped<IAgentHook, SqlExecutorHook>();
services.AddScoped<IAgentUtilityHook, SqlExecutorUtilityHook>();
2024-09-17 11:32:11 +00:00
services.AddScoped<IPlanningHook, SqlDriverPlanningHook>();
2024-01-13 21:17:40 +00:00
}
}