<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Mimic Mode]]></title><description><![CDATA[Mimic Mode]]></description><link>https://mimic-mode.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 18 Sep 2026 17:33:46 GMT</lastBuildDate><atom:link href="https://mimic-mode.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Build Your Own AI Persona Like Hitesh Choudhary Using OpenAI & Streamlit]]></title><description><![CDATA[Want to chat with an AI version of Hitesh Choudhary? Or maybe your favorite creator? In this project, I’ll show you how I built a working Hitesh AI Persona using OpenAI, Streamlit, and some thoughtful prompting.


📌 What You’ll Build
An interactive ...]]></description><link>https://mimic-mode.hashnode.dev/build-your-own-ai-persona-like-hitesh-choudhary-using-openai-and-streamlit</link><guid isPermaLink="true">https://mimic-mode.hashnode.dev/build-your-own-ai-persona-like-hitesh-choudhary-using-openai-and-streamlit</guid><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Aryan Juneja]]></dc:creator><pubDate>Thu, 29 May 2025 12:39:02 GMT</pubDate><content:encoded><![CDATA[<blockquote>
<p>Want to chat with an AI version of Hitesh Choudhary? Or maybe your favorite creator? In this project, I’ll show you how I built a working <strong>Hitesh AI Persona</strong> using OpenAI, Streamlit, and some thoughtful prompting.</p>
</blockquote>
<hr />
<h2 id="heading-what-youll-build">📌 What You’ll Build</h2>
<p>An interactive web-based chatbot that mimics the personality, tone, and storytelling style of a real person. In my case — <strong>Hitesh Choudhary</strong>. You can swap the prompt with any creator, founder, or yourself!</p>
<hr />
<h2 id="heading-tools-youll-need">🧰 Tools You’ll Need</h2>
<ul>
<li><p>🧠 <a target="_blank" href="https://platform.openai.com/">OpenAI API</a> – To generate AI responses using GPT models.</p>
</li>
<li><p>🌐 <a target="_blank" href="https://streamlit.io/">Streamlit</a> – For building an interactive web UI quickly.</p>
</li>
<li><p>🔐 python-dotenv – To securely load your API keys.</p>
</li>
<li><p>💻 Python (&gt;=3.8) – The programming language to glue it all together.</p>
</li>
</ul>
<hr />
<h2 id="heading-project-structure">📁 Project Structure</h2>
<pre><code class="lang-plaintext">ai-persona/
├── persona.py          # Main Streamlit app file
├── .env                # Your OpenAI API key here
├── prompts/
│   └── hitesh_examples.json  # 40 examples of how Hitesh speaks
├── requirements.txt
└── README.md
</code></pre>
<hr />
<h2 id="heading-step-by-step-build">🧱 Step-by-Step Build</h2>
<h3 id="heading-1-create-virtual-environment">1️⃣ Create Virtual Environment</h3>
<pre><code class="lang-plaintext">python -m venv venv
source venv/bin/activate  # for Windows: venv\Scripts\activate
</code></pre>
<h3 id="heading-2-install-dependencies">2️⃣ Install Dependencies</h3>
<pre><code class="lang-plaintext">pip install streamlit openai python-dotenv
</code></pre>
<h3 id="heading-3-add-your-api-key">3️⃣ Add Your API Key</h3>
<p>Create a <code>.env</code> file:</p>
<pre><code class="lang-plaintext">OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxx
</code></pre>
<h3 id="heading-4-prompt-engineering-is-the">4️⃣ Prompt Engineering is the 💖</h3>
<p>To simulate Hitesh Choudhary:</p>
<ul>
<li><p>Collected transcripts from <strong>2-3 YouTube videos</strong></p>
</li>
<li><p>Studied his <strong>LinkedIn profile</strong> &amp; <strong>Udemy courses</strong></p>
</li>
<li><p>Captured his tone: Hinglish, emotional, storytelling</p>
</li>
<li><p>Created ~40 examples formatted like:</p>
</li>
</ul>
<pre><code class="lang-plaintext">{
  "role": "user",
  "content": "Hitesh bhai, mujhe backend seekhna hai par kahan se start karu?"
},
{
  "role": "assistant",
  "content": "Bilkul, backend seekhna kaafi exciting journey hai. Dekho sabse pehle Node.js ya Python choose karo..."
}
</code></pre>
<p>These examples help anchor the AI's <strong>style and tone</strong>.</p>
<hr />
<h3 id="heading-5-main-streamlit-app">5️⃣ Main Streamlit App</h3>
<p>Here’s a simplified version of <code>persona.py</code>:</p>
<pre><code class="lang-plaintext">import streamlit as st
from openai import OpenAI
from dotenv import load_dotenv
import os
import json

load_dotenv()
client = OpenAI()

SYSTEM_PROMPT = """
You are an AI version of Hitesh Choudhary.
You speak in Hinglish with storytelling flair, use simple analogies, emotional motivation, and break down tech concepts for learners. You are informal, encouraging, and sound like a relatable mentor.
"""

st.title("🤖 Chat with Hitesh Choudhary (AI)")
query = st.text_input("Aapka sawal?")

if query:
    with open("prompts/hitesh_examples.json", "r") as f:
        examples = json.load(f)

    messages = [{"role": "system", "content": SYSTEM_PROMPT}] + examples + [{"role": "user", "content": query}]

    res = client.chat.completions.create(
        model="gpt-4",
        messages=messages
    )
    st.write(res.choices[0].message.content)
</code></pre>
<blockquote>
<p>📌 Tip: You can wrap this in a loop or append user history to make multi-turn conversations.</p>
</blockquote>
<hr />
<h3 id="heading-6-run-the-app">6️⃣ Run the App 🚀</h3>
<pre><code class="lang-plaintext">streamlit run persona.py
</code></pre>
<p>It’ll open at <code>http://localhost:8501</code> and boom 💥 — your own <strong>Hitesh AI clone</strong>.</p>
<hr />
<h2 id="heading-modify-it-for-yourself">🧠 Modify It For Yourself</h2>
<p>Want to clone your own persona? Just change:</p>
<ul>
<li><p>The <code>SYSTEM_PROMPT</code> with your own style</p>
</li>
<li><p>Feed 10–50 prompt-response pairs that match your tone</p>
</li>
</ul>
<p>Example:</p>
<pre><code class="lang-plaintext">SYSTEM_PROMPT = "You are AI version of [Your Name]. You use Gen Z slang, emojis, and joke a lot."
</code></pre>
<hr />
<h2 id="heading-folder-diagram">🗂 Folder Diagram</h2>
<pre><code class="lang-plaintext">graph TD;
  A[persona.py] --&gt; B[.env];
  A --&gt; C[prompts/hitesh_examples.json];
  A --&gt; D[requirements.txt];
  B --&gt; E[OPENAI_API_KEY];
</code></pre>
<hr />
<h2 id="heading-test-the-live-demo">🧪 Test the Live Demo</h2>
<p>🔗 <a target="_blank" href="https://perosna-ai-vwfxavyehtbnwuwt53rywj.streamlit.app/"><strong>Try the AI Persona Demo</strong></a></p>
<p>📁 <strong>Code Repo:</strong> <a target="_blank" href="https://github.com/Aryan-juneja/Perosna-AI">Github Repo</a></p>
<p>Let me know if you build one for yourself!</p>
<hr />
<h2 id="heading-final-thoughts">🙌 Final Thoughts</h2>
<p>You don’t need to train a full model or host LLMs to build a custom AI. Just tweak prompts creatively and let OpenAI + Streamlit do the rest.</p>
<p>If you build your own AI Persona, I'd love to see it! Share your version on X (Twitter) with the hashtag <strong>#AIPersona</strong> and tag me!</p>
<p>Whether it's your mentor, a favorite creator, or your own clone — the possibilities are endless.</p>
<p>Happy building! 🚀</p>
]]></content:encoded></item></channel></rss>