https://github.com/royborgen/askai
A Python script that allows the user to chat with an AI using OpenAI's API
https://github.com/royborgen/askai
Last synced: over 1 year ago
JSON representation
A Python script that allows the user to chat with an AI using OpenAI's API
- Host: GitHub
- URL: https://github.com/royborgen/askai
- Owner: royborgen
- License: gpl-2.0
- Created: 2023-01-04T12:07:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-20T20:45:32.000Z (over 1 year ago)
- Last Synced: 2024-11-20T21:36:10.441Z (over 1 year ago)
- Language: Python
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:

## 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

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