The goal of the ChatBot is obtained the name, email, and skills from the user.
Demo of a Job Application Assistant using AI Agent:
The diagram of the states are shown below:
---
config:
look: handDrawn
theme: neutral
---
flowchart TB
A["User Input"] --> B["LLM"]
A -- \bye --> Exit[Exit]
B --> C{"Need a tool?"}
C -- No --> E["Generate Answer"]
C -- Yes --> D["Request a tool"]
E --> A
D --> F["1. Extract Application Info
2. Check Application Info"]
F --> G["Use the selected tool and obtain information"]
G --> B
E --> DecisionExit{All info gathered?}
DecisionExit -- yes ---> Exit
DecisionExit -- no ---> A
The Infinite Loop will receive the user input and process it. If the user provided information in their prompt that is useful for the job application (name, email, skills) the tool extract application info
will be called and save the values inside a dictionary. After that, the tool check application info
is called and check if it is missing information and provide feedback to the user.
Note: The extract application info
tool use Regex to extract the information. This can be improved using a more complex regex or using other LLM call.
- Only requires the litellm library for orchestration.
$ pip install litellm python-dotenv emojis
Note: You can use other model as OpenAI, Claude, ... You just need credits and an API Key. I'm using here Gemini because has a free tier.
- First you need to generate a API KEY from Google AI Studio. Click on the button
Get API Key
.
Note: Don't share your API Key, keep it in secret.
Create a file .env
and paste your GEMINI_API_KEY
generated before.
GEMINI_API_KEY=<your api key here>
Be sure that your API KEY is working and run the main script
$ python app_job_application_assistant.py
✨ Crafted with passion by BrenoAV 🛠️