Skip to content

A Python script that allows the user to chat with an AI using OpenAI's API

License

Notifications You must be signed in to change notification settings

royborgen/askAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

askAI

A Python script that allows the user to chat with an AI using OpenAI's API. For as long as the script is running, the AI will remember the conversation your having.

Example output:

image

Command

  • /quit will terminate the script
  • CTRL+C will terminate the script

Requirements

The script requires the following modules to be installed:

  • openai
  • random
  • configparser

The scripts looks for your OpenAI API key in config.ini, location as it is located. The file needs to have the have the following format:

[config]
api_key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Getting an OpenAI API key:

Register on OpenAP's webpage: https://beta.openai.com/signup

After signing up, navigate to view API keys in the menu

  1. Click on the menu "Personal" in the top right corner:
  2. Click view API keys
  3. Create new secrey key

image

  1. Copy the key and paste it in config.ini

About

A Python script that allows the user to chat with an AI using OpenAI's API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages