@langchain/google-genai 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/utils/common.cjs +1 -1
- package/dist/utils/common.js +1 -1
- package/package.json +1 -1
package/dist/utils/common.cjs
CHANGED
|
@@ -221,7 +221,7 @@ function convertResponseContentToChatGenerationChunk(response, extra) {
|
|
|
221
221
|
const functionCalls = response.functionCalls();
|
|
222
222
|
const [candidate] = response.candidates;
|
|
223
223
|
const { content, ...generationInfo } = candidate;
|
|
224
|
-
const text = content?.parts[0]?.text ?? "";
|
|
224
|
+
const text = content?.parts?.[0]?.text ?? "";
|
|
225
225
|
const toolCallChunks = [];
|
|
226
226
|
if (functionCalls) {
|
|
227
227
|
toolCallChunks.push(...functionCalls.map((fc) => ({
|
package/dist/utils/common.js
CHANGED
|
@@ -213,7 +213,7 @@ export function convertResponseContentToChatGenerationChunk(response, extra) {
|
|
|
213
213
|
const functionCalls = response.functionCalls();
|
|
214
214
|
const [candidate] = response.candidates;
|
|
215
215
|
const { content, ...generationInfo } = candidate;
|
|
216
|
-
const text = content?.parts[0]?.text ?? "";
|
|
216
|
+
const text = content?.parts?.[0]?.text ?? "";
|
|
217
217
|
const toolCallChunks = [];
|
|
218
218
|
if (functionCalls) {
|
|
219
219
|
toolCallChunks.push(...functionCalls.map((fc) => ({
|