(response)
| 78999 | return getFunctionCalls(response); |
| 79000 | } else if (response.promptFeedback) { |
| 79001 | throw new GoogleGenerativeAIResponseError(`Function call not available. ${formatBlockErrorMessage(response)}`, response); |
| 79002 | } |
| 79003 | return void 0; |
| 79004 | }; |
| 79005 | return response; |
| 79006 | } |
| 79007 | function getText(response) { |
| 79008 | var _a5, _b2, _c2, _d2; |
| 79009 | const textStrings = []; |
| 79010 | if ((_b2 = (_a5 = response.candidates) === null || _a5 === void 0 ? void 0 : _a5[0].content) === null || _b2 === void 0 ? void 0 : _b2.parts) { |
| 79011 | for (const part of (_d2 = (_c2 = response.candidates) === null || _c2 === void 0 ? void 0 : _c2[0].content) === null || _d2 === void 0 ? void 0 : _d2.parts) { |
| 79012 | if (part.text) { |
| 79013 | textStrings.push(part.text); |
| 79014 | } |
| 79015 | if (part.executableCode) { |
| 79016 | textStrings.push("\n```" + part.executableCode.language + "\n" + part.executableCode.code + "\n```\n"); |
| 79017 | } |
| 79018 | if (part.codeExecutionResult) { |
| 79019 | textStrings.push("\n```\n" + part.codeExecutionResult.output + "\n```\n"); |
| 79020 | } |
| 79021 | } |
| 79022 | } |
| 79023 | if (textStrings.length > 0) { |
| 79024 | return textStrings.join(""); |
| 79025 | } else { |
no test coverage detected
searching dependent graphs…