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

26 lines
985 B
C#
Raw Normal View History

2023-10-08 20:46:42 +00:00
using BotSharp.Abstraction.Plugins;
using BotSharp.Abstraction.Settings;
2023-10-08 20:46:42 +00:00
using BotSharp.Plugin.GoogleAI.Providers;
using BotSharp.Plugin.GoogleAI.Settings;
namespace BotSharp.Plugin.GoogleAI;
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
});
services.AddScoped<IChatCompletion, ChatCompletionProvider>();
services.AddScoped<ITextCompletion, TextCompletionProvider>();
}
}