Skip to content

Commit f1278b3

Browse files
committed
Stop completion when exception has occurred.
1 parent 8748db4 commit f1278b3

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.CallFunctions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public async Task CallFunctions(RoleDialogModel msg)
4343
catch (Exception ex)
4444
{
4545
msg.Content = ex.Message;
46+
msg.StopCompletion = true;
4647
_logger.LogError(msg.Content);
4748
}
4849

src/Infrastructure/BotSharp.Core/Instructs/InstructService.CallFunctions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ private async Task CallFunctions(RoleDialogModel msg)
3737
catch (Exception ex)
3838
{
3939
msg.Content = ex.Message;
40+
msg.StopCompletion = true;
4041
_logger.LogError(msg.Content);
4142
}
4243

0 commit comments

Comments
 (0)