Added new demo
This commit is contained in:
parent
cbc6687f0d
commit
c3beae9de7
15 changed files with 163 additions and 32 deletions
71
README.md
71
README.md
|
|
@ -6,64 +6,95 @@
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://www.linkedin.com/in/shubhamsaboo/">
|
<a href="https://www.linkedin.com/in/shubhamsaboo/">
|
||||||
<img src="https://img.shields.io/badge/-Follow%20Shubham Saboo-blue?logo=linkedin&style=flat-square" alt="LinkedIn">
|
<img src="https://img.shields.io/badge/-Follow%20Shubham%20Saboo-blue?logo=linkedin&style=flat-square" alt="LinkedIn">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://twitter.com/Saboo_Shubham_">
|
<a href="https://twitter.com/Saboo_Shubham_">
|
||||||
<img src="https://img.shields.io/twitter/follow/Shubham Saboo" alt="Twitter"> </a>
|
<img src="https://img.shields.io/twitter/follow/Shubham_Saboo" alt="Twitter">
|
||||||
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
# 🌟 Awesome LLM Apps
|
# 🌟 Awesome LLM Apps
|
||||||
A curated collection of awesome LLM apps built with RAG and AI agents. This repository features LLM apps that use models from OpenAI, Anthropic, Google, and even open-source models like LLaMA that you can run locally on your computer.
|
A curated collection of awesome LLM apps built with RAG and AI agents. This repository features LLM apps that use models from OpenAI, Anthropic, Google, and even open-source models like LLaMA that you can run locally on your computer.
|
||||||
|
|
||||||
|
## 📑 Table of Contents
|
||||||
|
|
||||||
|
- [🤔 Why Awesome LLM Apps?](#-why-awesome-llm-apps)
|
||||||
|
- [📂 Featured Projects](#-featured-projects)
|
||||||
|
- [💻 Local Lllama-3 with RAG](#-local-llama-3-with-rag)
|
||||||
|
- [🎯 Generative AI Web Search Assistant](#-generative-ai-web-search-assistant)
|
||||||
|
- [💬 Chat with GitHub Repo](#-chat-with-github-repo)
|
||||||
|
- [📈 AI Investment Agent](#-ai-investment-agent)
|
||||||
|
- [📰 Multi-Agent AI Researcher](#-multi-agent-ai-researcher)
|
||||||
|
- [📄 Chat with PDF](#-chat-with-pdf)
|
||||||
|
- [💻 Web Scraping AI Agent](#-web-scraping-ai-agent)
|
||||||
|
- [📨 Chat with Gmail](#-chat-with-gmail)
|
||||||
|
- [📽️ Chat with YouTube Videos](#-chat-with-youtube-videos)
|
||||||
|
- [🔎 Chat with Arxiv Research Papers](#-chat-with-arxiv-research-papers)
|
||||||
|
- [📝 Chat with Substack Newsletter](#-chat-with-substack-newsletter)
|
||||||
|
- [🚀 Getting Started](#-getting-started)
|
||||||
|
- [🤝 Contributing to Opensource](#-contributing-to-opensource)
|
||||||
|
|
||||||
## 🤔 Why Awesome LLM Apps?
|
## 🤔 Why Awesome LLM Apps?
|
||||||
- 💡 Discover practical and creative ways LLMs can be applied across different domains, from code repositories to email inboxes and more.
|
- 💡 Discover practical and creative ways LLMs can be applied across different domains, from code repositories to email inboxes and more.
|
||||||
- 🔥 Explore apps that combines LLMs from OpenAI, Anthropic, Gemini, and open-source alternatives with RAG and AI Agents.
|
- 🔥 Explore apps that combine LLMs from OpenAI, Anthropic, Gemini, and open-source alternatives with RAG and AI Agents.
|
||||||
- 🎓 Learn from well-documented projects and contribute to the growing opensource ecosystem of LLM-powered applications.
|
- 🎓 Learn from well-documented projects and contribute to the growing open-source ecosystem of LLM-powered applications.
|
||||||
|
|
||||||
## 📂 Featured Projects
|
## 📂 Featured Projects
|
||||||
|
|
||||||
### 💻 Local Lllama-3 with RAG
|
### 💻 Local Lllama-3 with RAG
|
||||||
Chat with any webpage using local Llama-3 and Retrieval Augmented Generation (RAG) in a Streamlit app. Enjoy 100% free and offline functionality.
|
Chat with any webpage using local Llama-3 and Retrieval Augmented Generation (RAG) in a Streamlit app. Enjoy 100% free and offline functionality.
|
||||||
|
|
||||||
|
### 🎯 Generative AI Web Search Assistant
|
||||||
|
Get pinpointed answers to your queries by combining search engines and LLMs using OpenAI's GPT-4 and the DuckDuckGo search engine for accurate responses.
|
||||||
|
|
||||||
### 💬 Chat with GitHub Repo
|
### 💬 Chat with GitHub Repo
|
||||||
Engage in natural conversations with your GitHub repositories using GPT-4. Uncover valuable insights and documentation effortlessly.
|
Engage in natural conversations with your GitHub repositories using GPT-4. Uncover valuable insights and documentation effortlessly.
|
||||||
|
|
||||||
### 📨 Chat with Gmail
|
### 📈 AI Investment Agent
|
||||||
Interact with your Gmail inbox using natural language. Get accurate answers to your questions based on the content of your emails with Retrieval Augmented Generation (RAG).
|
AI investment agent that compares the performance of two stocks and generates detailed stock reports with company insights, news, and analyst recommendations to help you make smart investment choices.
|
||||||
|
|
||||||
### 📝 Chat with Substack Newsletter
|
### 📰 Multi-Agent AI Researcher
|
||||||
Chat with a Substack newsletter using OpenAI's API and the Embedchain library in a Streamlit app. Leverage GPT-4 for precise answers based on newsletter content.
|
Use a team of AI agents to research top HackerNews stories and users with GPT-4 to generate blog posts, reports, and social media content on autopilot.
|
||||||
|
|
||||||
### 📄 Chat with PDF
|
### 📄 Chat with PDF
|
||||||
Engage in intelligent conversation and question-answering based on the content of your PDF documents. Simply upload and start asking questions.
|
Engage in intelligent conversation and question-answering based on the content of your PDF documents. Simply upload and start asking questions.
|
||||||
|
|
||||||
### 📽️ Chat with YouTube Videos
|
|
||||||
Dive into video content with interactive conversation and question-answering based on YouTube videos. Provide a URL and engage with the video's content through natural language.
|
|
||||||
|
|
||||||
### 💻 Web Scraping AI Agent
|
### 💻 Web Scraping AI Agent
|
||||||
Intelligently scrape websites using OpenAI API and the scrapegraphai library. Specify the URL and extraction requirements, and let the AI agent handle the rest.
|
Intelligently scrape websites using OpenAI API and the scrapegraphai library. Specify the URL and extraction requirements, and let the AI agent handle the rest.
|
||||||
|
|
||||||
|
### 📨 Chat with Gmail
|
||||||
|
Interact with your Gmail inbox using natural language. Get accurate answers to your questions based on the content of your emails with Retrieval Augmented Generation (RAG).
|
||||||
|
|
||||||
|
### 📽️ Chat with YouTube Videos
|
||||||
|
Dive into video content with interactive conversation and question-answering based on YouTube videos. Provide a URL and engage with the video's content through natural language.
|
||||||
|
|
||||||
|
### 🔎 Chat with Arxiv Research Papers
|
||||||
|
Explore the vast knowledge in arXiv research papers through interactive conversations using GPT-4 and unlock insights from millions of research papers.
|
||||||
|
|
||||||
|
### 📝 Chat with Substack Newsletter
|
||||||
|
Chat with a Substack newsletter using OpenAI's API and the Embedchain library in a Streamlit app. Leverage GPT-4 for precise answers based on newsletter content.
|
||||||
|
|
||||||
## 🚀 Getting Started
|
## 🚀 Getting Started
|
||||||
|
|
||||||
1. Clone the repository
|
1. Clone the repository
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git
|
git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Navigate to the desired project directory
|
2. Navigate to the desired project directory
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd awesome-llm-apps/chat_with_gmail
|
cd awesome-llm-apps/chat_with_gmail
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Install the required dependencies
|
3. Install the required dependencies
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Follow the project-specific instructions in each project's README.md file to set up and run the app.
|
4. Follow the project-specific instructions in each project's README.md file to set up and run the app.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ from embedchain.loaders.github import GithubLoader
|
||||||
import streamlit as st
|
import streamlit as st
|
||||||
import os
|
import os
|
||||||
|
|
||||||
GITHUB_TOKEN = os.getenv("GITHUB_TOKEN")
|
GITHUB_TOKEN = os.getenv("Your GitHub Token")
|
||||||
|
|
||||||
def get_loader():
|
def get_loader():
|
||||||
print("Creating GithubLoader")
|
|
||||||
loader = GithubLoader(
|
loader = GithubLoader(
|
||||||
config={
|
config={
|
||||||
"token": GITHUB_TOKEN
|
"token": GITHUB_TOKEN
|
||||||
|
|
@ -22,7 +22,6 @@ loader = st.session_state.loader
|
||||||
|
|
||||||
# Define the embedchain_bot function
|
# Define the embedchain_bot function
|
||||||
def embedchain_bot(db_path):
|
def embedchain_bot(db_path):
|
||||||
print("Creating Embedchain App")
|
|
||||||
return App.from_config(
|
return App.from_config(
|
||||||
config={
|
config={
|
||||||
"llm": {"provider": "ollama", "config": {"model": "llama3:instruct", "max_tokens": 250, "temperature": 0.5, "stream": True, "base_url": 'http://localhost:11434'}},
|
"llm": {"provider": "ollama", "config": {"model": "llama3:instruct", "max_tokens": 250, "temperature": 0.5, "stream": True, "base_url": 'http://localhost:11434'}},
|
||||||
|
|
@ -36,7 +35,7 @@ def load_repo(git_repo):
|
||||||
# Add the repo to the knowledge base
|
# Add the repo to the knowledge base
|
||||||
print(f"Adding {git_repo} to knowledge base!")
|
print(f"Adding {git_repo} to knowledge base!")
|
||||||
app.add("repo:" + git_repo + " " + "type:repo", data_type="github", loader=loader)
|
app.add("repo:" + git_repo + " " + "type:repo", data_type="github", loader=loader)
|
||||||
# st.success(f"Added {git_repo} to knowledge base!")
|
st.success(f"Added {git_repo} to knowledge base!")
|
||||||
|
|
||||||
|
|
||||||
def make_db_path():
|
def make_db_path():
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
## 🔎 Chat with Arxiv
|
## 🔎 Chat with Arxiv Research Papers
|
||||||
This Streamlit app enables you to engage in interactive conversations with arXiv, a vast repository of scholarly articles, using GPT-4o. With this RAG application, you can easily access and explore the wealth of knowledge contained within arXiv.
|
This Streamlit app enables you to engage in interactive conversations with arXiv, a vast repository of scholarly articles, using GPT-4o. With this RAG application, you can easily access and explore the wealth of knowledge contained within arXiv.
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
@ -5,8 +5,8 @@ from phi.llm.openai import OpenAIChat
|
||||||
from phi.tools.arxiv_toolkit import ArxivToolkit
|
from phi.tools.arxiv_toolkit import ArxivToolkit
|
||||||
|
|
||||||
# Set up the Streamlit app
|
# Set up the Streamlit app
|
||||||
st.title("Chat with Arxiv 🔎🤖")
|
st.title("Chat with Research Papers 🔎🤖")
|
||||||
st.caption("This app allows you to chat with arXiv using OpenAI GPT-4o model.")
|
st.caption("This app allows you to chat with arXiv research papers using OpenAI GPT-4o model.")
|
||||||
|
|
||||||
# Get OpenAI API key from user
|
# Get OpenAI API key from user
|
||||||
openai_access_token = st.text_input("OpenAI API Key", type="password")
|
openai_access_token = st.text_input("OpenAI API Key", type="password")
|
||||||
|
|
@ -19,7 +19,7 @@ if openai_access_token:
|
||||||
model="gpt-4o",
|
model="gpt-4o",
|
||||||
max_tokens=1024,
|
max_tokens=1024,
|
||||||
temperature=0.9,
|
temperature=0.9,
|
||||||
api_key=openai_access_token) , tools=[ArxivToolkit()], show_tool_calls=True
|
api_key=openai_access_token) , tools=[ArxivToolkit()]
|
||||||
)
|
)
|
||||||
|
|
||||||
# Get the search query from the user
|
# Get the search query from the user
|
||||||
23
chat_with_research_papers/chat_arxiv_llama3.py
Normal file
23
chat_with_research_papers/chat_arxiv_llama3.py
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Import the required libraries
|
||||||
|
import streamlit as st
|
||||||
|
from phi.assistant import Assistant
|
||||||
|
from phi.llm.ollama import Ollama
|
||||||
|
from phi.tools.arxiv_toolkit import ArxivToolkit
|
||||||
|
|
||||||
|
# Set up the Streamlit app
|
||||||
|
st.title("Chat with Research Papers 🔎🤖")
|
||||||
|
st.caption("This app allows you to chat with arXiv research papers using Llama-3 running locally.")
|
||||||
|
|
||||||
|
# Create an instance of the Assistant
|
||||||
|
assistant = Assistant(
|
||||||
|
llm=Ollama(
|
||||||
|
model="llama3:instruct") , tools=[ArxivToolkit()], show_tool_calls=True
|
||||||
|
)
|
||||||
|
|
||||||
|
# Get the search query from the user
|
||||||
|
query= st.text_input("Enter the Search Query", type="default")
|
||||||
|
|
||||||
|
if query:
|
||||||
|
# Search the web using the AI Assistant
|
||||||
|
response = assistant.run(query, stream=False)
|
||||||
|
st.write(response)
|
||||||
4
chat_with_research_papers/requirements.txt
Normal file
4
chat_with_research_papers/requirements.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
streamlit
|
||||||
|
phidata
|
||||||
|
arxiv
|
||||||
|
openai
|
||||||
41
investment_ai_agent/README.md
Normal file
41
investment_ai_agent/README.md
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
## 📈 AI Investment Agent
|
||||||
|
This Streamlit app is an AI-powered investment agent that compares the performance of two stocks and generates detailed reports. By using GPT-4o with Yahoo Finance data, this app provides valuable insights to help you make informed investment decisions.
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- Compare the performance of two stocks
|
||||||
|
- Retrieve comprehensive company information
|
||||||
|
- Get the latest company news and analyst recommendations
|
||||||
|
- Get the latest company news and analyst recommendations
|
||||||
|
|
||||||
|
### 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. Run the Streamlit App
|
||||||
|
```bash
|
||||||
|
streamlit run investment_agent.py
|
||||||
|
```
|
||||||
|
|
||||||
|
### How it Works?
|
||||||
|
|
||||||
|
- Upon running the app, you will be prompted to enter your OpenAI API key. This key is used to authenticate and access the OpenAI language model.
|
||||||
|
- Once you provide a valid API key, an instance of the Assistant class is created. This assistant utilizes the GPT-4 language model from OpenAI and the YFinanceTools for accessing stock data.
|
||||||
|
- Enter the stock symbols of the two companies you want to compare in the provided text input fields.
|
||||||
|
- The assistant will perform the following steps:
|
||||||
|
- Retrieve real-time stock prices and historical data using YFinanceTools
|
||||||
|
- Fetch the latest company news and analyst recommendations
|
||||||
|
- Gather comprehensive company information
|
||||||
|
- Generate a detailed comparison report using the GPT-4 language model
|
||||||
|
- The generated report will be displayed in the app, providing you with valuable insights and analysis to guide your investment decisions.
|
||||||
30
investment_ai_agent/investment_agent.py
Normal file
30
investment_ai_agent/investment_agent.py
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
# Import the required libraries
|
||||||
|
import streamlit as st
|
||||||
|
from phi.assistant import Assistant
|
||||||
|
from phi.llm.openai import OpenAIChat
|
||||||
|
from phi.tools.yfinance import YFinanceTools
|
||||||
|
|
||||||
|
# Set up the Streamlit app
|
||||||
|
st.title("AI Investment Agent 📈🤖")
|
||||||
|
st.caption("This app allows you to compare the performance of two stocks and generate detailed reports.")
|
||||||
|
|
||||||
|
# Get OpenAI API key from user
|
||||||
|
openai_api_key = st.text_input("OpenAI API Key", type="password")
|
||||||
|
|
||||||
|
if openai_api_key:
|
||||||
|
# Create an instance of the Assistant
|
||||||
|
assistant = Assistant(
|
||||||
|
llm=OpenAIChat(model="gpt-4o", api_key=openai_api_key),
|
||||||
|
tools=[YFinanceTools(stock_price=True, analyst_recommendations=True, company_info=True, company_news=True)],
|
||||||
|
show_tool_calls=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
# Input fields for the stocks to compare
|
||||||
|
stock1 = st.text_input("Enter the first stock symbol")
|
||||||
|
stock2 = st.text_input("Enter the second stock symbol")
|
||||||
|
|
||||||
|
if stock1 and stock2:
|
||||||
|
# Get the response from the assistant
|
||||||
|
query = f"Compare {stock1} to {stock2}. Use every tool you have."
|
||||||
|
response = assistant.run(query, stream=False)
|
||||||
|
st.write(response)
|
||||||
3
multi_agent_researcher/requirements.txt
Normal file
3
multi_agent_researcher/requirements.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
streamlit
|
||||||
|
phidata
|
||||||
|
openai
|
||||||
|
|
@ -6,7 +6,7 @@ from phi.llm.openai import OpenAIChat
|
||||||
|
|
||||||
# Set up the Streamlit app
|
# Set up the Streamlit app
|
||||||
st.title("Multi-Agent AI Researcher 🔍🤖")
|
st.title("Multi-Agent AI Researcher 🔍🤖")
|
||||||
st.caption("This app allows you to research top stories and users on HackerNews and write blog posts, reports and social posts on that.")
|
st.caption("This app allows you to research top stories and users on HackerNews and write blogs, reports and social posts.")
|
||||||
|
|
||||||
# Get OpenAI API key from user
|
# Get OpenAI API key from user
|
||||||
openai_api_key = st.text_input("OpenAI API Key", type="password")
|
openai_api_key = st.text_input("OpenAI API Key", type="password")
|
||||||
|
|
@ -24,7 +24,7 @@ pip install -r requirements.txt
|
||||||
|
|
||||||
4. Run the Streamlit App
|
4. Run the Streamlit App
|
||||||
```bash
|
```bash
|
||||||
streamlit run ai_webagent.py
|
streamlit run ai_websearch.py
|
||||||
```
|
```
|
||||||
|
|
||||||
### How It Works?
|
### How It Works?
|
||||||
|
|
@ -5,8 +5,8 @@ from phi.tools.duckduckgo import DuckDuckGo
|
||||||
from phi.llm.openai import OpenAIChat
|
from phi.llm.openai import OpenAIChat
|
||||||
|
|
||||||
# Set up the Streamlit app
|
# Set up the Streamlit app
|
||||||
st.title("AI Search Assistant 🤖")
|
st.title("AI Web Search Assistant 🤖")
|
||||||
st.caption("This app allows you to search the web using AI")
|
st.caption("This app allows you to search the web using GPT-4o")
|
||||||
|
|
||||||
# Get OpenAI API key from user
|
# Get OpenAI API key from user
|
||||||
openai_access_token = st.text_input("OpenAI API Key", type="password")
|
openai_access_token = st.text_input("OpenAI API Key", type="password")
|
||||||
Loading…
Reference in a new issue