Skip to main content


Showing posts with the label OpenAI

How To Search Content Which ChatGPT Can’t Find Today — OpenAI | Python

In this article, I’ll show you how can you get your hands dirty with Langchain agents. If you are not aware what Langchain is, I would recommend you to watch my recording here, wherein I just briefed about it. Langchain agents are the ones who uses LLM to determine what needs to be done and in which order. You can have a quick look at the available agents in the documentation, but I’ll list them here too. zero-shot-react-description react-docstore self-ask-with-search conversational-react-description Here agents work via tools and tools are nothing but those are functions which will be used by agents to interact with outside world. List of tools which are available today are: python_repl serpapi wolfram-alpha requests terminal pal-math pal-colored-objects llm-math open-meteo-api news-api tmdb-api google-search searx-search google-serper, etc In this article, I’m covering serpapi . Import Required Packages In order to get started, we need to import these below packages: from langchain

Tips To Get Started With Azure OpenAI

If you want to explore Azure OpenAI but not sure how to get started, then you are at the right place. I've created a video, which explains everything about get your journey started. Have a look:

Use Your Own Data To Get Response From GPT like ChatGPT | Python

In this article, I’ll show you how you can use your locally stored text files to get response using GPT-3 . You can ask questions and get response like ChatGPT . On technology front, we will be using: OpenAI  Langchain Python Input files You can take bunch of text files and store them in a directory on your local machine. I’ve grabbed input data from here and created 5 text files. My files are all about ‘ Cause And Effect Of Homelessness ’ and are placed in a directory named Store. Import Required Packages As we are using Python , let’s go ahead and import the required packages. If you do not have above packages installed on your machine, then please go ahead and install these packages before importing. Once required packages are imported, we need to get OpenAI API key. Get OpenAI API Key To get the OpenAI key, you need to go to, login and then grab the keys using highlighted way: Once you got the key, set that inside an environment variable(I’m using Windows). Load

Create Chatbot Based Using GPT-Index/LlamaIndex | OpenAI | Python

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/LlamaIndex, OpenAI and Pytho n. Let’s get started by installing the required Python module. Install modules/packages We need to install, two packages named  llama-index and langchain and this can be done using below lines: pip install llama-index pip install langchain Importing packages Next, we need to import those packages so that we can use them: from llama_index import SimpleDirectoryReader , GPTListIndex , GPTVectorStoreIndex , LLMPredictor , PromptHelper , ServiceContext , StorageContext ,load_index_from_storage 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, login and then grab the keys using highlighted way: Once you got the key