ChatGPT Clone With Streamlit And LangChain

<p>I have recently been working with streamlit and got this idea, &ldquo;What If I build a streamlit application with LangChain to make a clone of ChatGPT?&rdquo;. I took on the challenge and did it! In this article, I&rsquo;ll go ahead and explain to you how I was able to do just that.</p> <p>In previous articles, I went ahead and showed how to use LLMs that are hosted in the cloud. You can find the video of this here. In this post, we&rsquo;ll be using OpenAI&rsquo;s GPT-3.5 turbo for this.</p> <p>&nbsp;</p> <h1>Getting OpenAI API Key</h1> <p>The thing we need to do is get our own OpenAI API key ready. You can do this by visiting the&nbsp;official documentation of OpenAI&nbsp;and creating an account, once done, head to the API tab and get an API key. It&rsquo;s all for free for a given amount of tokens, just enough to write this app.</p> <p>Once you have the API key, create a project folder with two main files. The first file is&nbsp;<strong>app.py</strong>&nbsp;and&nbsp;<strong>.env</strong></p> <p><a href="https://medium.com/@princekrampah/chatgpt-clone-with-streamlit-and-langchain-e0d4fa78e33d">Click Here</a></p>
Tags: .env API app.py