GithubHelp home page GithubHelp logo

pkm-bot's Introduction

Build a GPT3 Chatbot for your Company

Build your own AI virtual assistant using your company documentation and GPT3

Set Up

  1. Get your OpenAI API key and add it Secrets as OPENAI_API_KEY
  2. Make up and API_KEY for the JSON API, this can just be something like a password if you'd like
  3. Fill the training/facts folder with as many text documents as you can containing information about the company you're training it on. Top tips would be handbooks, websites, how-to guides, and anything public facing.
  4. Please don't put anything top secret in there, no one wants their company financials leaked by an AI chatbot!
  5. Edit the master.txt file to represent how you want the bot to behave when interacting with the users
  6. Click Run, select option 1
  7. To chat with the bot, once you've one the training, select option 2

JSON API (Advanced Users)

Option 3, or stating automatically after five seconds on the menu, is the JSON API. You can use POST requests to this Repl's repl.co address to take the chat to a different location or app.

Here's a quick guide to dealing with the API part in Python

import requests

data to be sent to the server

data = {'key': 'YOUR API KEY', 'question': 'Your question', 'history': 'previous questioning history'}

sending post request and saving response as response object

r = requests.post(url = URL, data = data)

extracting response json

response_data = r.json()

printing response

print(response_data)

Credit

All based on the Amjad Masad Chat bot by IronCladDev on Replit For more information on how this works, check out Zahid Khawaja's Tutorial.

pkm-bot's People

Contributors

hongjiantang avatar ironcladdev avatar

Watchers

 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.