From ff82bf183cfa66decf7dd8879adef29e92ab3dd0 Mon Sep 17 00:00:00 2001 From: bracesproul Date: Mon, 29 Jul 2024 15:52:49 -0700 Subject: [PATCH] chore: lint files --- libs/langchain-google-common/src/chat_models.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libs/langchain-google-common/src/chat_models.ts b/libs/langchain-google-common/src/chat_models.ts index 207490cd3077..8d3884e94295 100644 --- a/libs/langchain-google-common/src/chat_models.ts +++ b/libs/langchain-google-common/src/chat_models.ts @@ -117,8 +117,15 @@ class ChatConnection extends AbstractGoogleLLMConnection< } // Combine adjacent function messages - if (cur[0]?.role === "function" && acc.length > 0 && acc[acc.length - 1].role === "function") { - acc[acc.length - 1].parts = [...acc[acc.length - 1].parts, ...cur[0].parts]; + if ( + cur[0]?.role === "function" && + acc.length > 0 && + acc[acc.length - 1].role === "function" + ) { + acc[acc.length - 1].parts = [ + ...acc[acc.length - 1].parts, + ...cur[0].parts, + ]; } else { acc.push(...cur); }