From 7c2961cdcd30e54e74b3b2afe8310cd9c06038af Mon Sep 17 00:00:00 2001 From: ikechan8370 Date: Mon, 29 Jul 2024 17:25:31 +0800 Subject: [PATCH] fix: text null --- client/CustomGoogleGeminiClient.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/CustomGoogleGeminiClient.js b/client/CustomGoogleGeminiClient.js index 671674c3..dfe79865 100644 --- a/client/CustomGoogleGeminiClient.js +++ b/client/CustomGoogleGeminiClient.js @@ -204,7 +204,7 @@ export class CustomGoogleGeminiClient extends GoogleGeminiClient { if (responseContent.parts.find(i => i.functionCall)) { // functionCall const functionCall = responseContent.parts.find(i => i.functionCall).functionCall - const text = responseContent.parts.find(i => i.text).text + const text = responseContent.parts.find(i => i.text)?.text if (text) { // send reply first opt.replyPureTextCallback && await opt.replyPureTextCallback(text)