From f9b1fd4fbb97dd53ced22d6c80cefc88a4524532 Mon Sep 17 00:00:00 2001 From: Nim Jayawardena Date: Fri, 1 Nov 2024 15:56:40 -0400 Subject: [PATCH] fix: Use USER and ASSISTANT in functionCallingStreamContent.js --- .../snippets/function-calling/functionCallingStreamContent.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generative-ai/snippets/function-calling/functionCallingStreamContent.js b/generative-ai/snippets/function-calling/functionCallingStreamContent.js index b8f01d44f8..11b28d2292 100644 --- a/generative-ai/snippets/function-calling/functionCallingStreamContent.js +++ b/generative-ai/snippets/function-calling/functionCallingStreamContent.js @@ -70,7 +70,7 @@ async function functionCallingStreamContent( contents: [ {role: 'user', parts: [{text: 'What is the weather in Boston?'}]}, { - role: 'model', + role: 'ASSISTANT', parts: [ { functionCall: { @@ -80,7 +80,7 @@ async function functionCallingStreamContent( }, ], }, - {role: 'user', parts: functionResponseParts}, + {role: 'USER', parts: functionResponseParts}, ], tools: functionDeclarations, };