BotSharp/src/Infrastructure/BotSharp.Abstraction/Loggers/IContentGeneratingHook.cs

20 lines
596 B
C#
Raw Normal View History

2023-11-29 23:23:14 +00:00
namespace BotSharp.Abstraction.Loggers;
2023-10-16 20:07:07 +00:00
/// <summary>
/// Model content generating hook, it can be used for logging, metrics and tracing.
/// </summary>
public interface IContentGeneratingHook
{
/// <summary>
/// Before content generating.
/// </summary>
/// <returns></returns>
Task BeforeGenerating(Agent agent, List<RoleDialogModel> conversations) => Task.CompletedTask;
/// <summary>
/// After content generated.
/// </summary>
/// <returns></returns>
Task AfterGenerated(RoleDialogModel message, TokenStatsModel tokenStats) => Task.CompletedTask;
}