This repository has been archived on 2025-09-28. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
ChatGPT-PyAPI/README.md

39 lines
808 B
Markdown
Raw Normal View History

2023-03-09 14:07:46 +01:00
# ChatGPT-PyAPI
2023-03-14 21:53:56 +01:00
A minimalistic Python Library for OpenAI's ChatGPT and Bing's Chatbot
## Supported APIs
### Official ChatGPT API by OpenAI
You need an API key for the official ChatGPT API.
2023-03-14 21:45:00 +01:00
The following models are supported:
2023-03-14 21:53:56 +01:00
- GPT-4
- GPT-4-0314
- GPT-4-32k
- GPT-4-32k-0314
- GPT-3.5-Turbo
- GPT-3.5-Turbo-0301
2023-03-14 21:45:00 +01:00
### Unofficial Bing Chatbot API
2023-03-14 21:53:56 +01:00
This requires the [EdgeGPT](https://github.com/acheong08/EdgeGPT) library to be installed, and your Cookies to be exported to a json file. See [EdgeGPT's README](https://github.com/acheong08/EdgeGPT#readme) for more infos.
## Examples
For examples, take a look at `examples.py`.
## CLI
Using the official API via ChatGPT:
```
OPENAI_API_KEY="..." ./cli.py Hello
```
Using Bing's Chatbot:
```
BING_COOKIES_FILE="~/cookies.json" ./cli.py bing Hello
```