by Ian Park, Sungmo Kwon
- Provides basic CRUD for managing users and projects
- Utilizes embedding to filter out best resources for each projects, which includes queries, context, etc.
- Adapt Gemini 1.5's API calls in a way that amplifies its strength
-
run.py: Main driver for Flask backend application -
app/: Application Package for Project Backendroutes.py: python file containing API endpoint routesfirebase.py: Functions that helps with using Firebase features, especially Realtime Database and FireStore DatabasegitReader.py: Functions that helps with reading GitHub repositories using PyGitHub Library
-
modules/: This directory contains the logistics of using Gemini API.ai.py: AI Library for this app
-
venv/: Configuration for Virtual Environment
URL: /user/signin
Method: POST
Request Body:
email: (string) email of the userfirstName: First Name of the userlastName: Last Name of the user
Response:
isNew: (boolean) true if the user is newly created in the Databaseuserid: id of the user signed inhasProjects: (boolean) true if the user has AT LEAST ONE project
URL: /project/init
Method: POST
Request Body:
repoName: (string) name of the repositoryauthKey: (string) Access Key for the repositoryuserid: (string) useridprojectName: (string) Project NametechTags: (list) list of technical Tags
Response:
message: "successfully read the repo {repoName}"geminiResponse: Output from Gemini after training the repository
URL: /project/askQuestion
Method: POST
Request Body:
userid: useridprojectid: id of the projectquery: text input of the question of the user
Response:
geminiAnswer: Markdown Format of Gemini's answer
URL: /project/loadProjects
Method: GET
Request Parameters:
userid: userid
Response:
projectList: List of dictionary. Each index contains two pairs of key & value. Keys include:projectid: id of the projectprojectName: name of the project
- Example: responseObj[0]['projectid'] = id of the first project (each dictionary entries are sorted by creation time)
URL: /project/getChatHistory/<userid>/<projectid>
Method: GET
Request Parameters:
userid: useridprojectid: id of the project
Response:
user_chat_history: List of dictionary. Each index contains two paris of key & value. Keys include:user: Question that user askedmodel: Answer from Gemini
- Obviously, indexes are sorted in chronological order
- Example: responseObj[0]['user'] contains the first question of the user, and responseObj[0]['model'] contains the answer to that question.
URL: /project/deleteProject
Method: DELETE
Request Parameters:
userid: useridprojectid: projectid
Response:
statusCode: 200 if successfully Deletedmessage: "delte!!"