Google Cloud - Community

A collection of technical articles and blogs published or curated by Google Cloud Developer Advocates. The views expressed are those of the authors and don't necessarily reflect those of Google.

AI Task Management App using Gemini and Google Cloud

Joshika
Google Cloud - Community
3 min readAug 10, 2024

--

Overview

Task management is a common challenge for professionals across various fields. Yu-Start aims to address this issue by leveraging AI and large language models (LLMs) to streamline daily task scheduling.

In this blog, we will delve into the implementation and deployment of Yu-Start using Google Cloud. This beginner-friendly guide will walk you through the process and give an insight about the project.

Design

The application is built using Svelte kit to leverage the server side features such as form submissions and API endpoints.

We are using PostgreSQL database hosted in Google Cloud SQL cluster for storing the user’s data as we have many relationships in our application.

Gemini and Vertex AI platform is combined with Vertex AI node.js SDK for generating responses from the LLM and function calling is used to fetch data from the Cloud SQL database based on the user’s prompt.

Artifact registry to used to store docker images and provide them to the cloud run service for serverless container based deployments.

Prerequisites

Tech Stack

  • Google Cloud Services: Vertex AI, Google Cloud Run, Artifact Registry, Gemini Pro 1.0, IAM, Cloud SQL.
  • Frontend: Svelte.js, Tailwind CSS, ShadCN UI.
  • Backend: Svelte kit, Prisma.
  • Database: PostgreSQL.

Google Cloud Setup

Sign in or sign up to Google Cloud Console and create a new project. Store the project ID for further use cases.

Start the Google Cloud Shell, a remote shell environment in cloud.

Let’s build Yu-Start

Steps Involved:

  • Enabling APIs to access Google Cloud Platform services.
  • Creating service account with required roles and permissions to access Vertex AI platform and Cloud SQL Instance.
  • Creating a Google Cloud SQL instance to run PostgreSQL.
  • Create a users, databases and run migrations in the Cloud SQL instance.
  • Building and deploying our app to Cloud Run.

Looks easy right! we have made it easy for the readers to deploy the app by running the deploy.sh script which will take care of all of the above steps.

Go the Google cloud console, select the newly created project and open cloud shell terminal.

Clone GitHub repository:

git clone https://github.com/Joshika22/yu-start.git
cd yu-start

Give permissions for the deploy.sh script to execute.

chmod +x deploy.sh

Run the script!!

./deploy.sh

The script will prompt for information regarding project to deploy the app:

  • Project ID
  • Google Cloud Gmail ID
  • Database Username: A new database user will be created in the cloud SQL instance.
  • Database Password: This the password for the new user.

That’s it, the application will take anywhere between 10 to 15 minutes to deploy since, creating Cloud SQL instance is a tedious task.

Demo

Here’s the demo for the AI-driven chatbot made with Gemini 1.0 Pro model , which utilizes function calling to create and retrieve task based on user queries.

What’s Next?

Call to action

To learn more about Google Cloud services and to create impact for the work you do, get around to these steps right away:

--

--

Google Cloud - Community
Google Cloud - Community

Published in Google Cloud - Community

A collection of technical articles and blogs published or curated by Google Cloud Developer Advocates. The views expressed are those of the authors and don't necessarily reflect those of Google.

Joshika
Joshika

Written by Joshika

Passionate Developer wandering in the Cloud Ecosystem

No responses yet