Create you own financial AI agent using open source LLM models
- Create a virtual environment, activate it and install all the required libraries (I used miniconda)
conda create -p venv python=3.12 # creates a virtual environment called venv in the current directory
conda activate ./venv # activate the virtual environment
pip install -r requirements.txt # install all the libraries in the requirements.txt file-
Create an account or login to groq (not Grok) and phidata and generate API keys.
-
Save the API keys in a
.envfile. Make sure the.envfile is in the root folder of this project
PHIDATA_API_KEY="your-phidata-api-key"
GROQ_API_KEY="your-groq-api-key"- You can try different models from groq website and see which suits you the best. I've used
llama3-groq-8b-8192-tool-use-preview - You can enter your prompt and accordingly change the last line of the file
financial_agent.py - Run the file
financial_agent.py
python3 financial_agent.py- Run the file
playground.py. This creates a playground for your financial agent and hosts it onhttp://localhost:7777by default - Go to phidata playground section and create a endpoint

- After connecting the endpoint, you can chat with your financial agent, just like ChatGPT