Build an AI Search Assistant with GPT-4o in just 15 lines of Python Code (step-by-step instructions):
1. Install the necessary Python Libraries
Run the following command from your terminal.
2. Import necessary libraries
• Streamlit for building the web app
• Phidata for building AI agents
• OpenAI for using the LLM
• Duckduckgo for the search functionality
3. Set up the Streamlit App
Streamlit lets you create user interface with just python code, for this app we will:
• Add a title to the app using 'st.title()'
• Add a description for the app using 'st.caption()'
4. Create and Initialize the AI assistant
• Create a text input to enter their OpenAI API key using 'st.text_input()'
• If the OpenAI API key is provided, create an instance of Assistant with gpt-4 as LLM and DuckDuckGo as the tool.
5. Search the Web with your Generative AI assistant
• Create a text input for the user to enter their query using 'st.text_input()'
• If a question is asked, run the assistant to get the answer and display it using 'st.write()'
Full Application code for Generative AI Search Assistant👇
Working Application demo using Streamlit
Paste the above code in vscode or pycharm and run the following command: 'streamlit run ai_webagent.py'
Find all the awesome LLM Apps demo with RAG and AI agents in the following Github Repo.
Web Action AI Agent that doesn’t just scrape but finds the data you need.
Firecrawl launched FIRE-1, an AI agent that navigates complex websites, interacts with buttons, fills forms, and gathers data beyond traditional scraping.
No manual steps required.
FIRE-1 AI Agent is available to use on Firecrawl starting today.
Huge AI agent updates from Anthropic, PayPal, Windsurf, Cognition AI, and more.
Multiple agents working in parallel was the highlight.
1. Devin 2.0 is here with a new agent-native IDE experience. It lets you run parallel Devins to take on multiple tasks at once. Starts at $20.
2. Genspark is a general-purpose superagent that can think, plan, act, and use tools to handle all your everyday tasks. Rather than using a computer in a sandboxed VM, it uses its in-house system to directly call APIs whenever needed.
Outperforms Manus AI and OpenAI Operator.
I have created 50+ AI Agents and RAG tutorials, 100% free and opensource.