Mulai 29 April 2025, model Gemini 1.5 Pro dan Gemini 1.5 Flash tidak tersedia di project yang belum pernah menggunakan model ini, termasuk project baru. Untuk mengetahui detailnya, lihat Versi dan siklus proses model.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Dokumen ini menjelaskan cara mengatasi error yang mungkin Anda alami saat
mengembangkan agen.
Error pembuatan konten
Masalah:
Anda akan menerima pesan error yang mirip dengan berikut ini:
ValueError: Cannot get the Candidate text.
Response candidate content part has no text.
Kemungkinan penyebab:
Error ini mungkin disebabkan oleh penggunaan versi langchain-google-vertexai
yang tidak kompatibel dengan google-cloud-aiplatform. Versi 1.0.2 atau yang lebih baru
dari langchain-google-vertexai diperlukan. Untuk memeriksa versi yang Anda gunakan,
jalankan perintah berikut di terminal:
pipshowlangchain-google-vertexai
Solusi yang direkomendasikan:
Instal versi 1.0.2 dari langchain-google-vertexai. Versi ini mencakup
update panggilan alat LangChain
yang diperlukan untuk berfungsi dengan google-cloud-aiplatform. Untuk mengupdate
versi langchain-google-vertexai, jalankan perintah berikut di
terminal Anda:
pipinstalllangchain-google-vertexai--upgrade
Setelah menjalankan perintah update, pastikan Anda menggunakan versi 1.0.2 atau
yang lebih baru dengan menjalankan perintah berikut di terminal:
pipshowlangchain-google-vertexai
Jika berada di instance notebook (misalnya, Jupyter atau Colab atau Workbench),
Anda mungkin perlu memulai ulang runtime untuk menggunakan paket yang diupdate.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-25 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."]]