Skip to main content

Posts

Showing posts with the label ChatGPT

Integrating ChatGPT With Google Docs

In this article, I’ll explain how you can integrate ChatGPT inside Google docs and utilize the capabilities of any text based OpenAI model of your choice. If you are not aware what Google docs is — it is an offering by Google, where in you can create and collaborate documents online. Setting Up Google Docs You can go to https://docs.google.com/, login with your Gmail id and you are all set. If you have already created any document, you can open that otherwise you can go ahead and open a new document. New document will look something like this: In the above window, click on Extensions button and select Apps Script: On click of Apps Script will open up an editor wherein we will write our code. If you're looking for complete source code and explanation, then feel free to check out my article on Medium . Alternatively you can watch the video here .

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

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 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). 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 https://openai.com/, login and then grab the keys using highlighted way: Once you got the key