Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Build your own chatbot with Gemini by Stefania ...

Build your own chatbot with Gemini by Stefania Pecore

Devs will gain hands-on experience through step-by-step instructions on building a sample chatbot, from initial setup, deployment on GCP, and a basic UI.

The talk also addresses important considerations like authentication, session management, and integration with other Google Cloud services.

https://youtu.be/Hqgl_s4Fdas

DevFest Montreal 2024

GDG Montreal

November 14, 2024
Tweet

More Decks by GDG Montreal

Other Decks in Programming

Transcript

  1. Build and deploy a Gemini Chatbot with UI From zero

    to my own hero Montréal Stefania Pecore, Women Techmakers Montréal Lead
  2. Gemini that will help you when you are lazy! Streamlit

    that is your ally (especially if you suck at web dev) Google Cloud Platform GCP Cloud Build and Cloud Run Docker and GCP Artifact Registry Who are you going to meet today?
  3. Who Am I? • University degree in linguistics and foreign

    languages, Ph.D. in AI • Applied AI in several industries: ◦ Research and Teaching (UBS, NRC Italy and Canada, UOttawa) ◦ E-Commerce (Soledis Shopify Vannes) ◦ Home automation (STIIMA Milan) ◦ Video Games (among others: Square Enix, Behavior Interactive) ◦ BioTech-Health (Sardo-Onco) • Ambassador, mentor and AI expert elected by: ◦ Google Women Techmakers ◦ Women In AI ◦ Women In Games ◦ Technovation Montreal ◦ UNESCO Women4Ethical AI
  4. Great but… I was scared of the step following the

    pure data science part My face when I heard “deployment”
  5. What are we building? A chatbot for lonely people trying

    to organize a vacation through Q+A with an imaginary friend and reading guide docs (PDF)
  6. Why is Docker important? • Consistency and Portability • Fully

    integrated with GCP: • DevOps • Security and Isolation
  7. GCP Artifact Registry gcloud services enable artifactregistry.googleapis.com gcloud artifacts repositories

    create devfest2024-repo --repository-format=Docker --location=us-central1 --description="docker repository for devfest2024" Why should we care about Artifact Registry? • Next-generation container image and package management • Artifact Registry provides a single place to manage container images as well as language-specific packages (like Maven, npm, Python packages) and OS packages (Debian, RPM) • Enhanced security and access control: It offers more fine-grained permissions • Regional repositories (+++ availability and speed) • Integration with Google Cloud services • Improved CI/CD pipelines (Docker, Git) • Lifecycle management
  8. GCP Identity and Access Management (IAM) gcloud iam service-accounts add-iam-policy-binding

    [email protected] viceaccount.com --member="serviceAccount:PROJECT_NUMB [email protected]. com " --role="roles/iam.serviceAccountUser" Updated IAM policy for serviceAccount [[email protected] rviceaccount.com]. Why should we care about IAM? • Fine-grained Access Control • Centralized Management access across all GCP services • Enhanced Security (Role-Based Access Control, Context-aware (Policies on IP address, time of access) • Multi-factor authentication • Life easier for Compliance and Auditing
  9. GCP Build gcloud builds submit --region=us-central1 --tag us-central1-docker.pkg.dev/devfest2024-440819/ devfest2024-repo/devfest2024-repo:finalreally What

    is GCP Build? • fully managed, serverless CI/CD • Automation: Cloud Build automates the building, testing, and deployment of applications • Flexibility: It supports a wide range of programming languages and build tools • Integration: GitHub, Bitbucket, and Cloud Source Repositories • Docker Support: push and… Build • Scalability: Being serverless, it can handle multiple builds concurrently without requiring infrastructure management • Cost-Effective: Users only pay for the computing resources used during builds
  10. GCP Run What is GCP Run? • fully managed compute

    platform that enables you to run stateless containers that are invocable via HTTP requests • Serverless: It abstracts away infrastructure management, allowing developers to focus on writing code • Scalability: Cloud Run automatically scales based on incoming traffic • Language Agnostic • Integration: Cloud Run integrates well with other Google Cloud services like Cloud Storage, Cloud SQL, and Stackdriver • Cost-Effective: You only pay for the actual compute resources used when your application is running • Security: It provides built-in security features like IAM policies for user authentication and authorization
  11. Things are not over yet - what’s next? Improve UI

    (multi page) Save logs with a cheap option Add the multimodality: audio and video Play with the other ways of doing this and see the differences!
  12. And you can see how this will go (part 2)

    on our YouTube channel… Wait, our?? Montréal
  13. Women Techmakers is a program created by Google to celebrate

    International Women’s Day by highlighting the talent of women in technology. Our mission at Women Techmakers Montreal? To provide inspiration to start or continue a career in technology and help establishing a solid networking to realize your professional project beyond the day of the event. See you on April 5th!