BotSharp/src/Plugins/BotSharp.Plugin.GoogleAI/GoogleAiPlugin.cs

28 lines
1.1 KiB
C#
Raw Normal View History

2023-10-08 20:46:42 +00:00
using BotSharp.Abstraction.Plugins;
using BotSharp.Abstraction.Settings;
2024-12-23 02:12:35 +00:00
using BotSharp.Plugin.GoogleAi.Providers.Chat;
using BotSharp.Plugin.GoogleAi.Providers.Text;
2023-10-08 20:46:42 +00:00
2024-12-23 02:12:35 +00:00
namespace BotSharp.Plugin.GoogleAi;
2023-10-08 20:46:42 +00:00
public class GoogleAiPlugin : IBotSharpPlugin
{
2024-01-12 22:20:22 +00:00
public string Id => "962ff441-2b40-4db4-b530-49efb1688a75";
2023-12-26 03:16:41 +00:00
public string Name => "Google AI";
public string Description => "Making AI helpful for everyone (PaLM 2, Gemini)";
public string IconUrl => "https://vectorseek.com/wp-content/uploads/2021/12/Google-AI-Logo-Vector.png";
2023-10-08 20:46:42 +00:00
public void RegisterDI(IServiceCollection services, IConfiguration config)
{
services.AddScoped(provider =>
2023-10-08 20:46:42 +00:00
{
var settingService = provider.GetRequiredService<ISettingService>();
return settingService.Bind<GoogleAiSettings>("GoogleAi");
2023-10-08 20:46:42 +00:00
});
2024-12-23 02:12:35 +00:00
services.AddScoped<ITextCompletion, PalmTextCompletionProvider>();
services.AddScoped<ITextCompletion, GeminiTextCompletionProvider>();
services.AddScoped<IChatCompletion, PalmChatCompletionProvider>();
services.AddScoped<IChatCompletion, GeminiChatCompletionProvider>();
2023-10-08 20:46:42 +00:00
}
}