Imersão Agentes de IA - Alura + Google Gemini
Estou refazendo a Imersão Agentes de IA - Alura + Google Gemini e mesmo seguindo passo a passo todas as aulas o código está apresentando erros, com o código disponível na pagina "feito pelos instrutores" ocorre os mesmos erros.
Projeto dos Instrutores
segue abaixo
Aula 01
!pip install -q --upgrade langchain langchain-google-genai google-generativeai
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
opentelemetry-proto 1.37.0 requires protobuf<7.0,>=5.0, but you have protobuf 4.25.8 which is incompatible.
ydf 0.13.0 requires protobuf<7.0.0,>=5.29.1, but you have protobuf 4.25.8 which is incompatible.
**Importação da API Key
from google.colab import userdata
from langchain_google_genai import ChatGoogleGenerativeAI**
GOOGLE_API_KEY = userdata.get('GEMINI_API_KEY')**
ERRO:
ModuleNotFoundError Traceback (most recent call last)
/tmp/ipython-input-3109593305.py in <cell line: 0>()
1 from google.colab import userdata
----> 2 from langchain_google_genai import ChatGoogleGenerativeAI
3
4 GOOGLE_API_KEY = userdata.get('GEMINI_API_KEY')
/usr/local/lib/python3.12/dist-packages/langchain_google_genai/chat_models.py in
40 )
41 from langchain_core.outputs import ChatGeneration, ChatGenerationChunk, ChatResult
---> 42 from langchain_core.pydantic_v1 import Field, root_validator
43 from langchain_core.utils import get_from_dict_or_env
44 from tenacity import (
ModuleNotFoundError: No module named 'langchain_core.pydantic_v1'
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
![erro ao executar o codigo Importação da API Key
POR FAVOR! como resolver essa falha ?