<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Akhil Mulagada on Medium]]></title>
        <description><![CDATA[Stories by Akhil Mulagada on Medium]]></description>
        <link>https://medium.com/@akhilmulagada20?source=rss-04f95fcabe0d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*K5rZreyrU_KLcHJc</url>
            <title>Stories by Akhil Mulagada on Medium</title>
            <link>https://medium.com/@akhilmulagada20?source=rss-04f95fcabe0d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 19:27:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@akhilmulagada20/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Chatting with Historical Legends through AI]]></title>
            <link>https://medium.com/@akhilmulagada20/chatting-with-historical-legends-through-ai-a48303205d03?source=rss-04f95fcabe0d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a48303205d03</guid>
            <category><![CDATA[google]]></category>
            <category><![CDATA[gemini]]></category>
            <category><![CDATA[techonology]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[chatbots]]></category>
            <dc:creator><![CDATA[Akhil Mulagada]]></dc:creator>
            <pubDate>Tue, 26 Nov 2024 08:18:00 GMT</pubDate>
            <atom:updated>2024-11-26T09:45:33.740Z</atom:updated>
            <content:encoded><![CDATA[<h3>INTRODUCTION</h3><p>Learning history can be dull and disconnected.Imagine having a conversation with Thomas Edison about innovation, discussing philosophy with Krishna, or seeking writing advice from William Shakespeare. With our *Historical Figure Simulator*, powered by Gemini AI and Google Cloud, we’ve made this vision a reality.</p><h3>DESIGN</h3><p>The design of the Historical Figure Simulator is centered around an engaging and interactive user experience. The architecture includes:</p><p>1. <strong>Frontend</strong>: Built with<strong> React.js</strong>, offering a seamless, intuitive interface. <br>2. <strong>Backend</strong>: Powered by <strong>Firebase</strong> for real-time data handling and scalability. <br>3. <strong>Database</strong>: <strong>Firestore</strong>, a flexible and scalable NoSQL cloud database, manages user interactions and historical content efficiently. <br>4. <strong>AI Engine</strong>: <strong>Gemini AI</strong> drives the natural language processing, ensuring historical accuracy and contextually rich conversations. <br>5. <strong>Cloud Services</strong>: <strong>Google Cloud</strong> supports deployment and scaling, ensuring reliable performance.</p><p><strong>Key Design Considerations: </strong><br>- <strong>Accuracy:</strong> Each figure’s responses are crafted to reflect their historical context and personality. <br>- <strong>Scalability:</strong> The use of Firestore and Google Cloud ensures smooth performance for concurrent users. <br>- <strong>Interactivity:</strong> An emphasis on dynamic and engaging conversational flows.</p><p><strong><em>flow of the project</em></strong></p><figure><img alt="flow chart for the project" src="https://cdn-images-1.medium.com/max/590/1*g_SFXEIoLPQd8N-lmkjMCg.png" /></figure><h3>Prerequisites</h3><p><strong>Tools &amp; Software</strong>:</p><ul><li>Node.js and npm</li><li>Firebase account with Firestore enabled</li><li>Gemini AI API</li><li>Google cloud</li><li>React + Vite</li></ul><p><strong>Concepts to Know</strong>:</p><ul><li>React (components, props, hooks)</li><li>Firestore CRUD operations</li><li>How to use APIs (GET/POST requests)</li></ul><h3>Step by step instructions</h3><h4><strong>Step 1: Set Up Firebase</strong></h4><ul><li>Create a Firebase project in the Firebase Console.</li><li>Enable Firestore in your project.</li><li>Create a collection called figures to store historical data.</li><li>Enable hosting for deployment.</li><li>Add Firebase config to your React project</li></ul><pre>sample data set for firestore<br>{<br>  &quot;name&quot;: &quot;Albert Einstein&quot;,<br>  &quot;field&quot;: &quot;Physics&quot;,<br>  &quot;personality&quot;: &quot;Curious, witty&quot;,<br>  &quot;quirks&quot;: &quot;Messy hair, no socks&quot;,<br>  &quot;humorTopics&quot;: [&quot;Relativity&quot;, &quot;Physics humor&quot;]<br>}</pre><h4>Step 2 : Obtaining Gemini API key</h4><ul><li>Select your Google Cloud project or create a new one if you don’t have one already from Google Vertex AI Studio.</li><li>Enable Vertex AI API Key.</li><li>Create an API key , copy the key and store it securely.</li></ul><h4>Step 3 : Initialize Your React App</h4><ul><li><strong>Run</strong></li></ul><pre>Run: npx create-react-app historical-figure-chat</pre><p><strong>Install required Libraries</strong></p><pre>npm install firebase axios tailwindcss</pre><p><strong>Create the chat interface on React.</strong></p><pre>import React, { useState } from &quot;react&quot;;<br>import axios from &quot;axios&quot;;<br><br>const ChatApp = () =&gt; {<br>  const [input, setInput] = useState(&quot;&quot;);<br>  const [messages, setMessages] = useState([]);<br><br>  const handleSend = async () =&gt; {<br>    const userMessage = { sender: &quot;User&quot;, text: input };<br>    setMessages([...messages, userMessage]);<br><br>    // Call Gemini API<br>    const response = await axios.post(&quot;https://gemini-api-endpoint&quot;, {<br>      query: input,<br>    });<br>    const aiMessage = { sender: &quot;AI&quot;, text: response.data.reply };<br>    setMessages([...messages, userMessage, aiMessage]);<br>    setInput(&quot;&quot;);<br>  };<br><br>  return (<br>    &lt;div&gt;<br>      &lt;div&gt;<br>        {messages.map((msg, idx) =&gt; (<br>          &lt;p key={idx}&gt;<br>            &lt;strong&gt;{msg.sender}:&lt;/strong&gt; {msg.text}<br>          &lt;/p&gt;<br>        ))}<br>      &lt;/div&gt;<br>      &lt;input<br>        value={input}<br>        onChange={(e) =&gt; setInput(e.target.value)}<br>        placeholder=&quot;Ask something...&quot;<br>      /&gt;<br>      &lt;button onClick={handleSend}&gt;Send&lt;/button&gt;<br>    &lt;/div&gt;<br>  );<br>};<br><br>export default ChatApp;</pre><p><strong>Integrate Firestore and store the chat data</strong></p><pre>import { collection, addDoc } from &quot;firebase/firestore&quot;;<br>import { db } from &quot;./firebase&quot;;<br><br>const saveMessage = async (message) =&gt; {<br>  await addDoc(collection(db, &quot;messages&quot;), message);<br>};</pre><p><strong>Deploy on GCP using Firebase Hosting</strong></p><pre>firebase init<br>firebase deploy</pre><h3>Result</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D6G5gwFkHKHGNxnQZJ9qnw.png" /><figcaption>User Interface of the project</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*ysNey9aKE0qAZbcp7UvcQQ.png" /><figcaption>a Chat with Lord Krishna trained on Mahabharat</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*b7GZMnHrO5OW39AKkTXNoA.png" /><figcaption>a Chat with Albert Einstein</figcaption></figure><h3>What’s Next?</h3><ul><li>Make multiple Figures talk with each other.</li><li>Enhance with sentiment analysis to adjust AI responses dynamically.</li><li>Integrate voice-to-text and text-to-voice for accessibility.</li></ul><h3>Call to Action</h3><p>To learn more about Google Cloud services and to create impact for the work you do, get around to these steps right away:</p><ul><li>Register for <a href="https://rsvp.withgoogle.com/events/cv">Code Vipassana sessions</a>. <br>- Join the <a href="https://www.meetup.com/datapreneur-social/">Datapreneur Social meetup group</a>. <br>- Sign up to become a <a href="https://cloud.google.com/innovators?utm_source=cloud_sfdc&amp;utm_medium=email&amp;utm_campaign=FY23-1H-vipassana-innovators&amp;utm_content=joininnovators&amp;utm_term=-">Google Cloud Innovator</a>.</li></ul><p>Follow me on Linkedin</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a48303205d03" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>