Code Monkey home page Code Monkey logo

docgpt's Introduction

docGPT ๐Ÿ“„

ChatGPT directly integrated into Google Docs ๐Ÿ“‘

This project is now discontinued. Please Contribute (Read Below)! ๐Ÿ™

Feel free to make any pull requests to update this project. I will review and then approve them.

Thank you to the wonderful devs who are building ChatGPT APIs!

Feel free to rebuild this project with these APIs!

Table of Contents

Notes
Usage
Run your own ChatGPT API (Devs only)
Credits

Usage

  • Google Docs
  • MS Word

Google Docs

  1. Get the template: https://docs.google.com/document/d/1N7qvw5mZdVe2u2IQ5pnVDmUjHsLEfq9_Z0Tf8PHloZA/edit?usp=sharing

  2. Make a copy of the document

alt text

  1. Type something in your Google Doc

alt text

  1. Select your question, or whatever text you want to send to ChatGPT

alt text

  1. Use the extension!

alt text

  1. Accept the Authorization request & sign into google

alt text

  1. Click Advanced, go to ChatGPT & allow the scopes required

alt text

  1. Get your result!

alt text

MS Word

  1. Open a new word document

  2. Enable the Developer Tab on Word

  3. Click Macros alt text

  4. Create a new macro with the name AddToShortcut alt text

  5. Copy the code in wordGPT/ask.bas of this repo, and paste it into the Word VBA Editor

  6. Click Tools > References in the navbar
    alt text

  7. Search for Microsoft Scripting Runtime and enable it
    image

  8. Click OK and Save the file containing the code you pasted.

  9. Right click selected text in Word and click Ask ChatGPT

image

  1. Wait for your result! (Word may become temporarily unresponsive while waiting for the result)

API

Follow this guide if you don't want to use my premade template, and want to start a ChatGPT REST API server of your own!

Without Docker

  1. Clone this repo with
git clone https://github.com/cesarhuret/docGPT.git
  1. Visit https://chat.openai.com/chat and log in or sign up
  • Rename .env.example to .env
  • Get your OpenAI email and password, and insert them into the .env file.
  1. Set up and host the web server:
cd server
## Install Requirements
pip install -r requirements.txt

## Run the server
python server.py

Docker Installation

  1. Make sure you have docker installed and running

  2. Build your docker image

cd server

#Build the image
docker build -t chatgpt-api

  1. Run your docker image
docker run -p 8080:8080 -e email=YOUR_EMAIL_GOES_HERE -e password=YOUR_PASSWORD_GOES_HERE chatgpt-api

Using the REST API

  • Send a POST request to https://docgpt.kesarx.repl.co/chat with an application/json body:
{
  'message': 'Your questions go here'
}
  • returns a string:
"here's the response to your question"

In Google Docs

  1. Get the URL of the server. Ex: http://localhost:8080/chat

  2. Enter your server URL into the Google Docs add-on script.

  3. Google Docs

  • Go to Google Docs and create a new document.
  • Click on Extension > Apps Script
  • Copy the contents of add-on/ask.js into the script editor
  • Replace the SERVER_URL variable with your server URL
  • Save the script
  • Go back to the Google Doc and refresh the page
  • Click on Extension - ChatGPT should be visible under Apps Script

Credits

docgpt's People

Contributors

cesarhuret avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.