fix: text null

This commit is contained in:
ikechan8370 2024-07-29 17:25:31 +08:00
parent 1682b715fd
commit 7c2961cdcd

View file

@ -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)