Skip to content

Commit 951bd9e

Browse files
committed
Update step_06
1 parent 235075a commit 951bd9e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

colorist/step_06/lib/services/gemini_chat_service.dart

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,17 @@ class GeminiChatService {
7878

7979
if (block.functionCalls.isNotEmpty) {
8080
final geminiTools = ref.read(geminiToolsProvider);
81-
final results = <(String, Map<String, Object?>)>[];
82-
for (final functionCall in block.functionCalls) {
83-
results.add((
84-
functionCall.name,
85-
geminiTools.handleFunctionCall(functionCall.name, functionCall.args),
86-
));
87-
}
8881
final responseStream = chatSession.sendMessageStream(
89-
Content.functionResponses(
90-
results.map((result) => FunctionResponse(result.$1, result.$2)),
91-
),
82+
Content.functionResponses([
83+
for (final functionCall in block.functionCalls)
84+
FunctionResponse(
85+
functionCall.name,
86+
geminiTools.handleFunctionCall(
87+
functionCall.name,
88+
functionCall.args,
89+
),
90+
),
91+
]),
9292
);
9393
await for (final response in responseStream) {
9494
final responseText = response.text;

0 commit comments

Comments
 (0)