Soluciona problemas de desarrollo de una aplicación
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En este documento, se describe cómo resolver errores que puedes encontrar cuando desarrollas una aplicación.
Errores de generación de contenido
Problema:
Recibes un mensaje de error similar al siguiente:
ValueError: Cannot get the Candidate text.
Response candidate content part has no text.
Causa posible:
Este error puede deberse a una versión de langchain-google-vertexai que no es compatible con google-cloud-aiplatform. Se requiere la versión 1.0.2 o una posterior de langchain-google-vertexai. Para verificar qué versión estás usando, ejecuta el siguiente comando en la terminal:
pipshowlangchain-google-vertexai
Solución recomendada:
Instala la versión 1.0.2 de langchain-google-vertexai. Esta versión incluye las actualizaciones de llamada a la herramienta LangChain que son necesarias para trabajar con google-cloud-aiplatform. Para actualizar tu versión de langchain-google-vertexai, ejecuta el siguiente comando en tu terminal:
pipinstalllangchain-google-vertexai--upgrade
Después de ejecutar el comando de actualización, verifica que estés usando la versión 1.0.2 o posterior mediante la ejecución del siguiente comando en tu terminal:
pipshowlangchain-google-vertexai
Si estás en una instancia de notebook (por ejemplo, Jupyter, Colab o Workbench), es posible que debas reiniciar tu entorno de ejecución para usar los paquetes actualizados.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[],[],null,["This document describes how to resolve errors that you might encounter when\n[developing an agent](/vertex-ai/generative-ai/docs/agent-engine/develop/overview).\n\nContent generation errors\n\n**Issue**:\n\nYou receive an error message similar to the following: \n\n ValueError: Cannot get the Candidate text.\n Response candidate content part has no text.\n\n**Possible cause**:\n\nThis error might be caused by using a version of `langchain-google-vertexai`\nthat's not compatible with `google-cloud-aiplatform`. Version `1.0.2` or later\nof `langchain-google-vertexai` is required. To check which version you're using,\nrun the following command in your terminal: \n\n pip show langchain-google-vertexai\n\n**Recommended solution**:\n\nInstall version `1.0.2` of `langchain-google-vertexai`. This version includes\nthe [LangChain tool-calling](https://github.com/langchain-ai/langchain-google/pull/166)\nupdates that are required to work with `google-cloud-aiplatform`. To update your\nversion of `langchain-google-vertexai`, run the following command in your\nterminal: \n\n pip install langchain-google-vertexai --upgrade\n\nAfter running the update command, verify that you're using version `1.0.2` or\nlater by running the following command in your terminal: \n\n pip show langchain-google-vertexai\n\nIf you're in a notebook instance (for example, Jupyter or Colab or Workbench),\nyou might need to restart your runtime to use the updated packages."]]