Issue in ChatVertexAI Generation: Cannot read properties of undefined (reading 'text') #7171
Open
5 tasks done
Labels
auto:bug
Related to a bug, vulnerability, unexpected error with an existing feature
Checked other resources
Example Code
A very basic chain:
TypeError: Cannot read properties of undefined (reading 'text')
at ChatVertexAI.generate (file:///Users/user/code/projects/internal1/node_modules/.pnpm/@langchain+google-common@0.1.1@langchain+core@0.3.0_zod@3.23.5/node_modules/@langchain/google-common/dist/chat_models.js:275:64)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.allSettled (index 0)
at async ChatVertexAI._generateUncached (file:///Users/user/code/projects/internal1/node_modules/.pnpm/@langchain+core@0.3.0_openai@4.40.0/node_modules/@langchain/core/dist/language_models/chat_models.js:182:29)
at async ChatVertexAI.invoke (file:///Users/user/code/projects/internal1/node_modules/.pnpm/@langchain+core@0.3.0_openai@4.40.0/node_modules/@langchain/core/dist/language_models/chat_models.js:56:24)
at async RunnableSequence.invoke (file:///Users/user/code/projects/internal1/node_modules/.pnpm/@langchain+core@0.3.0_openai@4.40.0/node_modules/@langchain/core/dist/runnables/base.js:1144:33)
at async RunnableSequence.invoke (file:///Users/user/code/projects/internal1/node_modules/.pnpm/@langchain+core@0.3.0_openai@4.40.0/node_modules/@langchain/core/dist/runnables/base.js:1150:27)
at async RunnableSequence.invoke (file:///Users/user/code/projects/internal1/node_modules/.pnpm/@langchain+core@0.3.0_openai@4.40.0/node_modules/@langchain/core/dist/runnables/base.js:1150:27)
at async forward (file:///Users/user/code/projects/internal1/node_modules/.pnpm/langsmith@0.1.41@langchain+core@0.3.0_langchain@0.3.5_openai@4.40.0/node_modules/langsmith/dist/evaluation/_runner.js:670:9)
at async RetryOperation._fn (/Users/user/code/projects/internal1/node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.js:50:12)
The text was updated successfully, but these errors were encountered: