2023-11-29 23:23:14 +00:00
|
|
|
namespace BotSharp.Logger;
|
|
|
|
|
|
|
|
|
|
public static class BotSharpLoggerExtensions
|
|
|
|
|
{
|
2024-01-11 00:57:30 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// BotSharp conversation log
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="services"></param>
|
|
|
|
|
/// <param name="config"></param>
|
|
|
|
|
/// <returns></returns>
|
2023-11-29 23:23:14 +00:00
|
|
|
public static IServiceCollection AddBotSharpLogger(this IServiceCollection services, IConfiguration config)
|
|
|
|
|
{
|
|
|
|
|
services.AddScoped<IContentGeneratingHook, CommonContentGeneratingHook>();
|
|
|
|
|
services.AddScoped<IContentGeneratingHook, TokenStatsConversationHook>();
|
2023-11-30 21:03:44 +00:00
|
|
|
services.AddScoped<IContentGeneratingHook, VerboseLogHook>();
|
2024-03-24 17:33:41 +00:00
|
|
|
services.AddScoped<IConversationHook, RateLimitConversationHook>();
|
2023-11-29 23:23:14 +00:00
|
|
|
return services;
|
|
|
|
|
}
|
|
|
|
|
}
|