Skip to content

freq1062/lgt-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lgt-chatbot

A tech support AI chatbot written using Google Apps Script. Written for the Let's Get Together nonprofit as a part of the 2024 Social Innovation Project volunteer organization. See the chatbot in action here

Direct Google Macro Link image

Features

  1. Chat memory: Whenever an input is received, the backend stores a summary of the overall conversation to allow the user to refer to things that have been brought up since starting the conversation.
  2. Retrieval Augmented Generation (RAG): Whenever the user asks a question that matches with a list of questions and answers in a separate Google Sheet, the matching answer is returned instead of the normal LLM response to allow for more targeted and relevant responses.
image
  1. Image recognition: The user can upload an image, and an OCR model will read the text from the image as well as give a high level overview of what the image contains. This allows the user to simply take a screenshot of any error messages they might have.
  2. Automatic translation: If the user asks a question in a language other than English, all responses and aspects of the chatbot box are translated to their respective language through the Google Translate API.

Limitations

Because all the API calls are off of free credits, there is a limit to how many questions can be asked per day. This has been partially mitigated internally by keeping 5 free API keys that are rotated. Also, the delay for a response can sometimes be long, especially for images.

Reloading the page resets all memory that the conversation had. This is unfortunately not fixable because the chatbot is an embed to a Google Apps Script, which doesn't allow for caching.

What I learned

I learned how to implement a simple RAG system, how to connect various APIs to make a robust system, how to coordinate with a team and get feedback from non-technical supervisors, how to lead a test event and explain technical details to students, and how to deploy something from Google Apps Script to real users.

How to Contribute to GitHub

  1. Create a fork of this project to work on in your own GitHub account.

  2. Install the following Chrome extension.

  3. Go to GitHub's Personal Access Token Settings and generate a new token with "repo" and "gist" scopes.

  4. Open the Google Apps Script Editor and create a new project to pull this repo into.

  5. When prompted, fill in your username and access token in the popup from the Chrome extension.

  6. There should be a "Repository" option in the editor. Select the fork you made of this repo and press the downward-facing arrow to pull the code into the editor.

  7. Make your changes, test the deployment with the "test deployment" option in Google Apps Script and press the upward-facing arrow to push those changes. Then make a pull request to merge your fork with the main branch (which is actually being shown on the website).

Releases

No releases published

Packages