@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.
@@ -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) => ({
@@ -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) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/google-genai",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Google Generative AI integration for LangChain.js",
5
5
  "type": "module",
6
6
  "engines": {