100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.
Add new demo
ShubhamSaboob251fdd744e9
diff --git a/chat_with_arxiv/README.md b/chat_with_arxiv/README.mdnew file mode 100644index 00000000..eda46a9e--- /dev/null+++ b/chat_with_arxiv/README.md@@ -0,0 +1,28 @@+## π Chat with 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+- Engage in conversational interactions with arXiv+- Access and explore a vast collection of research papers+- Utilize OpenAI GPT-4o for intelligent responses++### 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 chat_arxiv.py+```\ No newline at end of filediff --git a/chat_with_arxiv/chat_arxiv.py b/chat_with_arxiv/chat_arxiv.pynew file mode 100644index 00000000..76880485--- /dev/null+++ b/chat_with_arxiv/chat_arxiv.py@@ -0,0 +1,31 @@+# Import the required libraries+import streamlit as st+from phi.assistant import Assistant+from phi.llm.openai import OpenAIChat+from phi.tools.arxiv_toolkit import ArxivToolkit++# Set up the Streamlit app+st.title("Chat with Arxiv ππ€")+st.caption("This app allows you to chat with arXiv using OpenAI GPT-4o model.")++# Get OpenAI API key from user+openai_access_token = st.text_input("OpenAI API Key", type="password")++# If OpenAI API key is provided, create an instance of Assistant+if openai_access_token:+ # Create an instance of the Assistant+ assistant = Assistant(+ llm=OpenAIChat(+ model="gpt-4o",+ max_tokens=1024,+ temperature=0.9,+ api_key=openai_access_token) , 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)\ No newline at end of filediff --git a/chat_with_arxiv/requirements.txt b/chat_with_arxiv/requirements.txtnew file mode 100644index 00000000..0f954bf3--- /dev/null+++ b/chat_with_arxiv/requirements.txt@@ -0,0 +1,4 @@+streamlit+phidata+arxiv+openai\ No newline at end of file