-
-
Notifications
You must be signed in to change notification settings - Fork 629
Expand file tree
/
Copy pathInstructHookBase.cs
More file actions
35 lines (28 loc) · 1.01 KB
/
InstructHookBase.cs
File metadata and controls
35 lines (28 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using BotSharp.Abstraction.Coding.Contexts;
using BotSharp.Abstraction.Coding.Models;
using BotSharp.Abstraction.Instructs.Models;
namespace BotSharp.Abstraction.Instructs;
public class InstructHookBase : IInstructHook
{
public virtual string SelfId => throw new NotImplementedException("Please set SelfId as agent id!");
public virtual async Task BeforeCompletion(Agent agent, RoleDialogModel message)
{
await Task.CompletedTask;
}
public virtual async Task AfterCompletion(Agent agent, InstructResult result)
{
await Task.CompletedTask;
}
public virtual async Task OnResponseGenerated(InstructResponseModel response)
{
await Task.CompletedTask;
}
public virtual async Task BeforeCodeExecution(Agent agent, CodeExecutionContext context)
{
await Task.CompletedTask;
}
public virtual async Task AfterCodeExecution(Agent agent, CodeExecutionContext context, CodeExecutionResponseModel response)
{
await Task.CompletedTask;
}
}