Skip to content

Commit c7965ae

Browse files
committed
Remove brackets from switch
1 parent 3df99f3 commit c7965ae

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

ChatRPG/API/ReActAgentChain.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ protected override async Task<IChainValues> InternalCallAsync(IChainValues value
140140
switch (res.Value[ReActAnswer])
141141
{
142142
case AgentAction:
143-
{
144143
var action = (AgentAction)res.Value[ReActAnswer];
145144
var tool = _tools[action.Action.ToLower(CultureInfo.InvariantCulture)];
146145
var toolRes = await tool.ToolTask(action.ActionInput, cancellationToken).ConfigureAwait(false);
@@ -150,13 +149,10 @@ await _conversationSummaryMemory.ChatHistory
150149
await _conversationSummaryMemory.ChatHistory.AddMessage(new Message("Thought:", MessageRole.System))
151150
.ConfigureAwait(false);
152151
break;
153-
}
154152
case AgentFinish:
155-
{
156153
var finish = (AgentFinish)res.Value[ReActAnswer];
157154
values.Value[OutputKeys[0]] = finish.Output;
158155
return values;
159-
}
160156
}
161157
}
162158

0 commit comments

Comments
 (0)