Skip to content

Commit b4047a5

Browse files
authored
fix env vars in code sample in README
1 parent 4d7e518 commit b4047a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ import { ChatGPTAPI, getOpenAIAuth } from 'chatgpt'
5959
async function example() {
6060
// use puppeteer to bypass cloudflare (headful because of captchas)
6161
const openAIAuth = await getOpenAIAuth({
62-
email: process.env.EMAIL,
63-
password: process.env.EMAIL
62+
email: process.env.OPENAI_EMAIL,
63+
password: process.env.OPENAI_PASSWORD
6464
})
6565

6666
const api = new ChatGPTAPI({ ...openAIAuth })
@@ -121,8 +121,8 @@ async function example() {
121121
const { ChatGPTAPI, getOpenAIAuth } = await import('chatgpt')
122122

123123
const openAIAuth = await getOpenAIAuth({
124-
email: process.env.EMAIL,
125-
password: process.env.EMAIL
124+
email: process.env.OPENAI_EMAIL,
125+
password: process.env.OPENAI_PASSWORD
126126
})
127127

128128
const api = new ChatGPTAPI({ ...openAIAuth })

0 commit comments

Comments
 (0)