+91 9873530045
admin@learnwithfrahimcom
Mon - Sat : 09 AM - 09 PM

Step 2: Setting up Google Cloud & Vertex AI

Step 2: Setting up Google Cloud & Vertex AI


Now that we know our goal (a chatbot powered by LLMs), the first thing we need is an environment to run our AI models. We’ll use Google Cloud Platform (GCP) and its Vertex AI service.

πŸ’‘ Why Google Cloud & Vertex AI?

  • Vertex AI allows us to use Google’s Large Language Models (LLMs) without training them ourselves.
  • We can call these models via APIs (similar to ChatGPT) to generate chatbot responses.
  • Our local machine (PyCharm/Streamlit app) will send user prompts β†’ Vertex AI β†’ return answers.
  • This avoids needing expensive GPUs on our laptop.

βœ… What We Need

  1. A Google Cloud Account (can be a regular Gmail, or a Google Workspace account).
  2. A Google Cloud Project – this acts like a container for our AI app.
  3. Enable Vertex AI API inside the project.
  4. A Service Account + API Key or JSON Credentials to allow our app to talk to Vertex AI securely.

πŸ›  How to Get What We Need

Step 2.1: Create a Google Cloud Account

πŸ‘‰ You’ll usually get $300 in free credits when you first sign up.

Step 2.2: Create a New Project

  1. Go to Google Cloud Console.
  2. Click the Project Selector at the top β†’ New Project.
  3. Give it a name like chatbot-project.
  4. Click Create.

Step 2.3: Enable Vertex AI API

  1. In the left sidebar, go to APIs & Services β†’ Library.
  2. Search for Vertex AI API.
  3. Click Enable.

Step 2.4: Set up Authentication

Our app needs permission to use Vertex AI. For this, we use a Service Account.

  1. In the Cloud Console, go to IAM & Admin β†’ Service Accounts.
  2. Click Create Service Account.
  3. Name it vertex-chatbot.
  4. Assign the role: Vertex AI User.
  5. Click Create Key β†’ JSON.
  6. A .json file will be downloaded β†’ keep this safe! (we’ll use it in PyCharm).
πŸ“‚ Save the JSON file in your project folder (e.g., ~/chatbot/key.json).

πŸš€ What’s Next?

We now have Google Cloud + Vertex AI ready. In the next step, we’ll connect our local Streamlit app to Vertex AI using the API key / JSON credentials and make our first chatbot request.