Skip to content

Commit

Permalink
Update installation guidelines (#5)
Browse files Browse the repository at this point in the history
* Revert "Add chatgpt-wrapper changes (#4)"

This reverts commit 38f04cb.

* Update README for installation
  • Loading branch information
idilsulo authored Apr 9, 2023
1 parent 38f04cb commit 8a9121c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,15 @@ This repository is built with Python and uses [spotipy](https://github.com/spoti

## Installation

**Step 1:** Create an [OpenAI account](https://beta.openai.com/account/api-keys) and set up credentials.

The Open API key can be obtained from [here](https://platform.openai.com/account/api-keys). Then, simply export the key into your local environment:

```
export OPENAI_API_KEY=<SECRET_KEY>
```
**Step 1:** Create an [OpenAI account](https://beta.openai.com/account/api-keys)

**Step 2:** Generate [Spotify Client ID & Secret Key](https://developer.spotify.com/dashboard/login)

**Step 3:** Install dependencies

```
pip install spotipy
pip install git+https://github.com/mmabrouk/chatgpt-wrapper
pip install git+https://github.com/mmabrouk/chatgpt-wrapper@18f3903cc083a794ec1b4e55e82f0e7ac5184f35
playwright install firefox
chatgpt install
```
Expand All @@ -42,7 +36,7 @@ This will then open up a browser window. Log in to ChatGPT in the browser window
**Note:** If you encounter any issues regarding ChatGPT wrapper installation, please refer to [chatgpt-wrapper](https://github.com/mmabrouk/chatgpt-wrapper).


**Step 4:** Setup credentials for Spotify API
**Step 4:** Setup credentials

This can be done via executing the following commands on Terminal.
```
Expand Down
4 changes: 2 additions & 2 deletions chatgptify.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import spotipy
from spotipy.oauth2 import SpotifyOAuth
from chatgpt_wrapper import OpenAIAPI
from chatgpt_wrapper import ChatGPT
import textwrap


Expand All @@ -17,7 +17,7 @@ class SpotifyPlaylist():
def __init__(self) -> None:
scope = 'playlist-modify-public playlist-modify-private user-library-read'

self.bot = OpenAIAPI()
self.bot = ChatGPT()
self.sp = spotipy.Spotify(auth_manager=SpotifyOAuth(client_id=os.environ['SPOTIFY_CLIENT_ID'],
client_secret=os.environ['SPOTIFY_CLIENT_SECRET'],
redirect_uri=os.environ['SPOTIFY_REDIRECT_URI'],
Expand Down

0 comments on commit 8a9121c

Please sign in to comment.