commit
d1df7f782a
|
|
@ -236,6 +236,7 @@ public partial class InstructService
|
||||||
// Before code execution
|
// Before code execution
|
||||||
foreach (var hook in hooks)
|
foreach (var hook in hooks)
|
||||||
{
|
{
|
||||||
|
await hook.BeforeCompletion(agent, message);
|
||||||
await hook.BeforeCodeExecution(agent, message, context);
|
await hook.BeforeCodeExecution(agent, message, context);
|
||||||
|
|
||||||
// Interrupted by hook
|
// Interrupted by hook
|
||||||
|
|
@ -271,6 +272,7 @@ public partial class InstructService
|
||||||
// After code execution
|
// After code execution
|
||||||
foreach (var hook in hooks)
|
foreach (var hook in hooks)
|
||||||
{
|
{
|
||||||
|
await hook.AfterCompletion(agent, response);
|
||||||
await hook.AfterCodeExecution(agent, response);
|
await hook.AfterCodeExecution(agent, response);
|
||||||
await hook.OnResponseGenerated(new InstructResponseModel
|
await hook.OnResponseGenerated(new InstructResponseModel
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue