mirror of
https://github.com/Shubhamsaboo/awesome-llm-apps.git
synced 2026-03-12 01:57:58 -05:00
Added new demo
This commit is contained in:
@@ -27,6 +27,7 @@ A curated collection of awesome LLM apps built with RAG and AI agents. This repo
|
||||
- [💬 Chat with GitHub Repo](#-chat-with-github-repo)
|
||||
- [📈 AI Investment Agent](#-ai-investment-agent)
|
||||
- [🗞️ AI Journalist Agent](#-ai-journalist-agent)
|
||||
- [💰 AI Personal Finance Agent](#-ai-personal-finance-agent)
|
||||
- [🛫 AI Travel Agent](#-ai-travel-agent)
|
||||
- [📰 Multi-Agent AI Researcher](#-multi-agent-ai-researcher)
|
||||
- [📄 Chat with PDF](#-chat-with-pdf)
|
||||
@@ -60,6 +61,9 @@ AI investment agent that compares the performance of two stocks and generates de
|
||||
### 🗞️ AI Journalist Agent
|
||||
AI-powered journalist agent that generates high-quality articles using OpenAI GPT-4o. It automates the process of researching, writing, and editing articles, allowing you to create compelling content on any topic with ease.
|
||||
|
||||
### 💰 AI Personal Finance Agent
|
||||
AI-powered personal finance planner that generates personalized financial plans using OpenAI GPT-4o. It automates the process of researching, planning, and creating tailored budgets, investment strategies, and savings goals.
|
||||
|
||||
## 🛫 AI Travel Agent
|
||||
AI-powered travel Agent that generates personalized travel itineraries using OpenAI GPT-4o. It automates the process of researching, planning, and organizing your dream vacation, allowing you to explore exciting destinations with ease.
|
||||
|
||||
|
||||
32
ai_personal_finance_agent/README.md
Normal file
32
ai_personal_finance_agent/README.md
Normal file
@@ -0,0 +1,32 @@
|
||||
## 💰 AI Personal Finance Planner
|
||||
This Streamlit app is an AI-powered personal finance planner that generates personalized financial plans using OpenAI GPT-4o. It automates the process of researching, planning, and creating tailored budgets, investment strategies, and savings goals, empowering you to take control of your financial future with ease.
|
||||
|
||||
### Features
|
||||
- Set your financial goals and provide details about your current financial situation
|
||||
- Use GPT-4o to generate intelligent and personalized financial advice
|
||||
- Receive customized budgets, investment plans, and savings strategies
|
||||
|
||||
### How to get Started?
|
||||
|
||||
1. Clone the GitHub repository
|
||||
|
||||
```bash
|
||||
git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git
|
||||
```
|
||||
2. Install the required dependencies:
|
||||
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
3. Get your OpenAI API Key
|
||||
|
||||
- Sign up for an [OpenAI account](https://platform.openai.com/) (or the LLM provider of your choice) and obtain your API key.
|
||||
|
||||
4. Get your SerpAPI Key
|
||||
|
||||
- Sign up for an [SerpAPI account](https://serpapi.com/) and obtain your API key.
|
||||
|
||||
5. Run the Streamlit App
|
||||
```bash
|
||||
streamlit run finance_agent.py
|
||||
```
|
||||
69
ai_personal_finance_agent/finance_agent.py
Normal file
69
ai_personal_finance_agent/finance_agent.py
Normal file
@@ -0,0 +1,69 @@
|
||||
from textwrap import dedent
|
||||
from phi.assistant import Assistant
|
||||
from phi.tools.serpapi_tools import SerpApiTools
|
||||
import streamlit as st
|
||||
from phi.llm.openai import OpenAIChat
|
||||
|
||||
# Set up the Streamlit app
|
||||
st.title("AI Personal Finance Planner 💰")
|
||||
st.caption("Manage your finances with AI Personal Finance Manager by creating personalized budgets, investment plans, and savings strategies using GPT-4o")
|
||||
|
||||
# Get OpenAI API key from user
|
||||
openai_api_key = st.text_input("Enter OpenAI API Key to access GPT-4o", type="password")
|
||||
|
||||
# Get SerpAPI key from the user
|
||||
serp_api_key = st.text_input("Enter Serp API Key for Search functionality", type="password")
|
||||
|
||||
if openai_api_key and serp_api_key:
|
||||
researcher = Assistant(
|
||||
name="Researcher",
|
||||
role="Searches for financial advice, investment opportunities, and savings strategies based on user preferences",
|
||||
llm=OpenAIChat(model="gpt-4o", api_key=openai_api_key),
|
||||
description=dedent(
|
||||
"""\
|
||||
You are a world-class financial researcher. Given a user's financial goals and current financial situation,
|
||||
generate a list of search terms for finding relevant financial advice, investment opportunities, and savings strategies.
|
||||
Then search the web for each term, analyze the results, and return the 10 most relevant results.
|
||||
"""
|
||||
),
|
||||
instructions=[
|
||||
"Given a user's financial goals and current financial situation, first generate a list of 3 search terms related to those goals.",
|
||||
"For each search term, `search_google` and analyze the results.",
|
||||
"From the results of all searches, return the 10 most relevant results to the user's preferences.",
|
||||
"Remember: the quality of the results is important.",
|
||||
],
|
||||
tools=[SerpApiTools(api_key=serp_api_key)],
|
||||
add_datetime_to_instructions=True,
|
||||
)
|
||||
planner = Assistant(
|
||||
name="Planner",
|
||||
role="Generates a personalized financial plan based on user preferences and research results",
|
||||
llm=OpenAIChat(model="gpt-4o", api_key=openai_api_key),
|
||||
description=dedent(
|
||||
"""\
|
||||
You are a senior financial planner. Given a user's financial goals, current financial situation, and a list of research results,
|
||||
your goal is to generate a personalized financial plan that meets the user's needs and preferences.
|
||||
"""
|
||||
),
|
||||
instructions=[
|
||||
"Given a user's financial goals, current financial situation, and a list of research results, generate a personalized financial plan that includes suggested budgets, investment plans, and savings strategies.",
|
||||
"Ensure the plan is well-structured, informative, and engaging.",
|
||||
"Ensure you provide a nuanced and balanced plan, quoting facts where possible.",
|
||||
"Remember: the quality of the plan is important.",
|
||||
"Focus on clarity, coherence, and overall quality.",
|
||||
"Never make up facts or plagiarize. Always provide proper attribution.",
|
||||
],
|
||||
add_datetime_to_instructions=True,
|
||||
add_chat_history_to_prompt=True,
|
||||
num_history_messages=3,
|
||||
)
|
||||
|
||||
# Input fields for the user's financial goals and current financial situation
|
||||
financial_goals = st.text_input("What are your financial goals?")
|
||||
current_situation = st.text_area("Describe your current financial situation")
|
||||
|
||||
if st.button("Generate Financial Plan"):
|
||||
with st.spinner("Processing..."):
|
||||
# Get the response from the assistant
|
||||
response = planner.run(f"Financial goals: {financial_goals}, Current situation: {current_situation}", stream=False)
|
||||
st.write(response)
|
||||
4
ai_personal_finance_agent/requirements.txt
Normal file
4
ai_personal_finance_agent/requirements.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
streamlit
|
||||
phidata
|
||||
openai
|
||||
google-search-results
|
||||
Reference in New Issue
Block a user