OpenAI chatbot emulator of job applicants with Azure CosmosDB and Langchain
Explore the docs »
Documentation
·
Report Bug
·
Request Feature
Table of Contents
This repository serves in fulfillment of the requirements for the Microsoft Develops AI Learning Hackathon 2024 in Devpost, where developers are expected to integrate their custom AI co-pilot developed during Phase 1 onto Azure with Azure CosmosDB explaining the use case, functionality, and how their application matters. Inspired by our earlier endeavors in customized chatbots, our team has developed ResuME, a friendly chatbot designed to empower job applicants in their job search by leveraging on the use of Generative AI from OpenAI models to emulate their professional profiles and win the confidence of prospective employers. Our team hopes that through this endeavor, future enhancements and improvements can be made to help augment jobseekers' ability to present themselves effectively, tailor their resumes to specific job requirements, and receive personalized career advice. By continually refining ResuME, we aim to make the job application process more efficient, accessible, and successful for all users, ultimately contributing to a more dynamic and inclusive job market.
Before getting this submission to run locally within your computer, ensure that the following prerequisites are fulfilled:
- You must have Docker installed in your computer with an internet connection.
- You must have your own generated OpenAI keys and endpoints and Azure CosmosDB with MongoDB (VCore) connection string generated from Azure.
- Copy the OpenAI key and endpoints along with your Azure CosmoDB connection string into
config.ini
. - Using your Terminal, change your directory to the directory
ResuME
where the Dockerfile for the Python backend is located. Run the following command in the Terminal.
docker build --pull --rm -f "Dockerfile" -t devguidebackendapi:latest "."
- Within that same directory, use your Terminal to change your directory to the directory
react-frontend
where another Dockerfile for the React-TS frontend is located. Run the following command in the Terminal.
docker build -t resu.me-frontend:1.0 .
- With both images installed, first initialize the Python backend service by entering the following command in the Terminal. Ensure that port 4242 is open.
docker run -d -p 4242:80 --name devguide-backend-api devguidebackendapi:latest
- With the Python backend service initialized, enter the next following command in the Terminal. Ensure that port 3000 is open.
docker run -d -p 3000:80 --name resu.me-frontend resu.me-frontend:1.0
- Once both containers have been initialized and are running, go to http://localhost:3000 to interact with the application.
- Copy the OpenAI key and endpoints along with your Azure CosmosDB connection string into
config.ini
. - Using your Terminal, change your directory to the directory
ResuME
where the project is located. Run the following command in the Terminal.
docker-compose up
- You should observe both
ResuME-frontend
andmicrosoft-backend
container initialized and running. Go to http://localhost:3000 to interact with the application.
Disclaimer: Microsoft Azure platform can only host AMD64 architecture-built containers as of Jun 2024. Ensure that you ideally have a Windows AMD64 OS for deployment, M1 MacOS not recommended.
- Copy the OpenAI key and endpoints along with your Azure CosmosDB connection string into
config.ini
. - Ensure that you have Azure CLI installed within your computer along with a valid Azure account.
- With your Azure CLI, login to Azure with:
az login
- If you do not have an existing Azure Container Registry, create a registry with:
az acr create --resource-group <resource-group> --name <registry-name> --sku Basic
- Login into your Azure Container Registry:
az acr login --name <registry-name>
- Using your Terminal, change your directory to the directory
ResuME
where the Dockerfile for the Python backend is located. Run the following command in the Terminal.
docker build --pull --rm -f "Dockerfile" -t resu.me-backend:1.0 "."
- Tag your docker image by replacing
<registry-name>
with your Azure Container Registry name.
docker tag resu.me-backend:1.0 <registry-name>.azurecr.io/resu.me-backend:1.0
- Push your Python backend Docker image to Azure Container Registry.
docker push <registry-name>.azurecr.io/resu.me-backend:1.0
- Add the extension
containerapp
in order to prepare initialization of container applications on Azure.
az extension add --name containerapp --upgrade
- Initialize your container application with the Python backend Docker image that was pushed into Azure Container registry. You may initialize your environment with this command too.
az containerapp up --name resume-backend \
--image <registry-name>.azurecr.io/resu.me-backend:1.0 \
--resource-group <resource-group> \
--environment <environment-name> \
--ingress external
- In Azure Web Portal, go to
resume-backend
Container App from your resource group and obtain the Application URL.
https://resume-backend.<identifier>.eastus.azurecontainerapps.io
-
Within this project, refactor all
http://localhost:4242
mentions intohttps://resume-backend.<identifier>.eastus.azurecontainerapps.io
. This will ensure that your frontend will map correctly to your running backend application on Azure. -
Within that project, use your Terminal to change your directory to the directory
react-frontend
where another Dockerfile for the React-TS frontend is located. Run the following command in the Terminal.
docker build -t resu.me-frontend:1.0 .
- Repeat step 7 to step 10 with the shell commands in Terminal:
docker tag resu.me-frontend:1.0 <registry-name>.azurecr.io/resu.me-frontend:1.0
docker push <registry-name>.azurecr.io/resu.me-frontend:1.0
az containerapp up --name resume-frontend \
--image <registry-name>.azurecr.io/resu.me-frontend:1.0 \
--resource-group <resource-group> \
--environment <environment-name> \
--ingress external
- In Azure Web Portal, go to
resume-frontend
Container App from your resource group and obtain the Application URL. You can now access the application from there.
https://resume-frontend.<identifier>.eastus.azurecontainerapps.io
- Should you require a static webapp hostname, create an Azure Web App interface and type out your preferred domain. Ensure that your configurations are set to deploy containers. Your hostname should look like this:
https://<desired-hostname>.azurewebsites.net/
- In the container step, select your configuration as follows.
Container Type: Docker Compose (Preview)
Registry source: Azure Container Registry
Registry: <registry-name>
Config: Attach aci-deploy.yml
- From
https://<desired-hostname>.azurewebsites.net/
, you can now access your application online.
Distributed under the MIT License. See LICENSE
for more information.
Project Link: https://github.com/TuWeile/ResuME