In this article, I’ll show you how can you create a basic chat bot which utilizes the data provided by you. Here we will be using GPT-Index, OpenAI and Pytho n. Let’s get started by installing the required Python module. Install modules/packages We need to install, two packages named gpt_index and langchain and this can be done using below lines: pip install gpt_index pip install langchain Importing packages Next, we need to import those packages so that we can use them: from gpt_index import SimpleDirectoryReader , GPTListIndex , GPTSimpleVectorIndex , LLMPredictor , PromptHelper from langchain import OpenAI import sys import os Please note that, here, we don’t need an GPU because we are not doing anything local. All we are doing is using OpenAI server. Grab OpenAI Key To grab the OpenAI key, you need to go to https://openai.com/, login and then grab the keys using highlighted way: Once you got the key, set that inside an environment variable(I’m using Windows). If you do not
Don't worry. Not everyone knows it...
This blog is all about my technical learnings pertaining to C#, Azure, Python, AI, ML, Visual Studio Code and many more.