Gen-AI Developer Classroom notes 02/Jul/2026

Setting up GCP with langchain

  • For this we need to install gcloud sdk Refer Here
  • Navigate to gcp console
  • Make the note of project id and navigate to agent platform overview.
    Preview
  • Note: Enable api’s if asked
    Preview
  • Then open the terminal and execute the following
gcloud init
gcloud auth application-default login
  • Refer Here for instructions for application-default login

  • Lets setup a new folder and use gemini models from gcp cloud

mkdir rag_learning_gcp
cd rag_learning_gcp
uv init .
uv add langchain python-dotenv langchain-google-genai ipykernel
# code .
  • Now select interpretor rag_learning_gcp
  • Now create a .env file with following data and fill your project id
GOOGLE_CLOUD_PROJECT=''
GOOGLE_CLOUD_LOCATION='us-central1'
GOOGLE_GENAI_USE_VERTEXAI=true

ChatPromptTemplate

Output Parsers

By continuous learner

enthusiastic technology learner

Leave a Reply

Discover more from Direct AI Powered By Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading