An open API service indexing awesome lists of open source software.

https://github.com/yjg30737/python-openai-wandb-tutorial

Use GPT-3 in Python with the OpenAI and WanDB
https://github.com/yjg30737/python-openai-wandb-tutorial

gpt gpt-3 openai openai-wandb python-ai wandb

Last synced: about 2 months ago
JSON representation

Use GPT-3 in Python with the OpenAI and WanDB

Awesome Lists containing this project

README

          

# python-openai-wandb-tutorial
Use GPT-3 in Python with the OpenAI and WanDB

## How to Use
1. `git clone ~`
2. `python -m pip install openai wandb==0.13.4` - i'll explain below why i installed the certain version of wandb
3. get openai api from here after sign up or login
4. paste it to [MY_OPENAPI_API_KEY] in main.py
5. get wandb api, read this tutorial provided by wandb to figure it out
6. type `wandb login` and paste your wandb api when they demand it
7. type `python main.py` to run
8. wait till the end

※ If you can't install it then see the Note below

## Result

The answer generated by GPT-3 will be printed.

The question in this script is

`Correct this to standard English:\n\nShe no went to the market.`

The answer is

`She didn't go to the market.`

WanDB makes a bunch of files such as log in the project directory.

You can see the tables and graph of the statistics of this in your wandb profile page as well.

## Note
This is using the text-davinci-003 model at GPT-3 which is latest one at this moment(2023-01-08).

This is the most accurate one, and also the slowest.

You have to install certain version of wandb(0.13.4) since this error occurs.

If you can't install openai because of subprocess-exited-with-error, just download this, extract it, type
```
python setup.py install
```
It might install this darn thing

This project is based on this article.