Build your own AI virtual assistant using your company documentation and GPT3
- Get your OpenAI API key and add it Secrets as
OPENAI_API_KEY
- Make up and
API_KEY
for the JSON API, this can just be something like a password if you'd like - Fill the
training/facts
folder with as manytext
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. - Please don't put anything top secret in there, no one wants their company financials leaked by an AI chatbot!
- Edit the
master.txt
file to represent how you want the bot to behave when interacting with the users - Click Run, select option
1
- To chat with the bot, once you've one the training, select option
2
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 = {'key': 'YOUR API KEY', 'question': 'Your question', 'history': 'previous questioning history'}
r = requests.post(url = URL, data = data)
response_data = r.json()
print(response_data)
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.