Shubham Saboo Profile picture
May 21, 2024 10 tweets 3 min read Read on X
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. Image
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 Image
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()' Image
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. Image
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()' Image
Full Application code for Generative AI Search Assistant👇 Image
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.

P.S: Don't forget to star the repo to show your support 🌟
github.com/Shubhamsaboo/a…
If you find this useful, RT to share it with your friends.

Don't forget to follow me @Saboo_Shubham_ for more such LLMs tips and tutorials.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Shubham Saboo

Shubham Saboo Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Saboo_Shubham_

May 4
10 MCP servers to supercharge your AI Agents.
1. Firecrawl MCP Server

Turns any site, even those rendered by JavaScript into ready‑to‑parse HTML or Markdown for your AI agent.
2. Browserbase MCP Server

Spins up a cloud browser so the model can load JS‑heavy pages, click around and grab screenshots. Image
Read 13 tweets
Apr 18
I built an MCP AI Agent using Gemini Flash 2.5 with access to AirBnB and Google Maps in just 30 lines of Python Code.

100% Opensource Code.
I have created 50+ AI Agents and RAG tutorials, 100% free and opensource.

Two simple steps to get started:
1. Subscribe to Unwind AI (for free): theunwindai.com
2. Star the repo: github.com/Shubhamsaboo/a…

New AI Agents and RAG tutorials added every week.
Here's the full Opensource code.

🌟 Star the repo for more: github.com/Shubhamsaboo/a…Image
Read 4 tweets
Apr 16
OpenAI just launched o3 and o4-mini with agentic tool use.

It's been just a few hours, and the internet is filled with incredible AI examples.

10 wild examples:

1. o3 creates a movie without video tools by sketching each frame of an otter and airplane scene and stitching them into a GIF, all in one shot.

2. o3 and o4-mini nailed the coding vibe check

Read 13 tweets
Apr 16
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.

Learn more about it here: firecrawl.dev/blog/launch-we…
I have created 50+ AI Agents and RAG tutorials, 100% free and opensource.

Two simple steps to get started:
1. Subscribe to Unwind AI (for free): theunwindai.com
2. Star the repo: github.com/Shubhamsaboo/a…

New AI Agents and RAG tutorials added every week.
Read 4 tweets
Apr 14
Let's build & deploy production grade Gemini AI Agents in 3 simple steps using Google Cloud Vertex AI Engine.

Works with LangChain, LlamaIndex, and other Agent frameworks. Image
1. Install Vertex AI SDK for Python

Install the latest version of the Vertex AI SDK for Python as well as extra dependencies related to Agent Engine and LangChain: Image
2.1 Import Libraries and Define Model Image
Read 8 tweets
Apr 4
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.

Two simple steps to get started:
1. Subscribe to Unwind AI (for free): theunwindai.com
2. Star the repo: github.com/Shubhamsaboo/a…

New AI Agents and RAG tutorials added every week. Image
Read 12 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(