Skip to content

rubiaru/build-a-google-chat-bot-with-chatgpt

 
 

Repository files navigation

Build a Google Chat Bot Powered by ChatGPT

You already use ChatGPT in the browser, but how do you incorporate the technology into your own product?

This code lab will walk you through all the steps to create a Google Chat bot that is powered by ChatGPT and fully customizable to your desires.

Prerequisites

  1. Google Workspace account with Google Chat enabled.
  2. Google Cloud account, with billing enabled, or free trial.
  3. OpenAI account, with billing enabled, or free trial credits.
  4. Experience with Python.

What You'll Learn

By the end of the code lab you will have learned:

  • How to set up and configure a Google Chat bot
  • How to set up a Google Cloud Function and trigger it from Google Chat
  • How to protect your bot's code from unauthorized traffic
  • How to use the Chat and Image APIs from OpenAI to make your bot brilliant
  • How to use slash commands to give your bot specific skills
  • How to use Google Cloud Datastore to track a history of messages
  • How to create cards and dialogs to improve the UX of your bot
  • How to combine everything you've built into a brand new skill for your bot

Structure and Progression

The lab is split in nine modules that are designed to be completed in order, with each one building on the work from the previous one.

In the first module you'll build a basic chat bot. Each subsequent module will add additional functionality to the bot. At the end of each module you should have a working bot which you can test to verify all the steps were completed successfully.

Each module also contains a repo which is how your code should look after completing all the steps in the module. If you ever get stuck, you can compare your code to the repo code to track down any issues.

As an alternative, you can start at any module and use the repo code from the previous module as the starting point for your project.

Modules

Workshop

This code lab was presented as a workshop for the Google Developer Student Club at the University of Colorado in Boulder.

Workshop Slides

Workshop Video

Workshop Video

References

Google Chat API


OpenAI


Google Cloud

Authors


Sponsor

This code lab was built by the makers of GQueues.

GQueues

Prioritize your team’s work with a task manager that helps you get more out of Google Workspace.



License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.0%
  • Shell 2.0%