Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Chatgpt Puppeteer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Chatgpt Puppeteer
Commits
b4047a5c
Commit
b4047a5c
authored
Dec 12, 2022
by
Zeke Sikelianos
Committed by
GitHub
Dec 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix env vars in code sample in README
parent
4d7e5188
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
readme.md
readme.md
+4
-4
No files found.
readme.md
View file @
b4047a5c
...
@@ -59,8 +59,8 @@ import { ChatGPTAPI, getOpenAIAuth } from 'chatgpt'
...
@@ -59,8 +59,8 @@ import { ChatGPTAPI, getOpenAIAuth } from 'chatgpt'
async
function
example
()
{
async
function
example
()
{
// use puppeteer to bypass cloudflare (headful because of captchas)
// use puppeteer to bypass cloudflare (headful because of captchas)
const
openAIAuth
=
await
getOpenAIAuth
({
const
openAIAuth
=
await
getOpenAIAuth
({
email
:
process
.
env
.
EMAIL
,
email
:
process
.
env
.
OPENAI_
EMAIL
,
password
:
process
.
env
.
EMAIL
password
:
process
.
env
.
OPENAI_PASSWORD
})
})
const
api
=
new
ChatGPTAPI
({
...
openAIAuth
})
const
api
=
new
ChatGPTAPI
({
...
openAIAuth
})
...
@@ -121,8 +121,8 @@ async function example() {
...
@@ -121,8 +121,8 @@ async function example() {
const
{
ChatGPTAPI
,
getOpenAIAuth
}
=
await
import
(
'
chatgpt
'
)
const
{
ChatGPTAPI
,
getOpenAIAuth
}
=
await
import
(
'
chatgpt
'
)
const
openAIAuth
=
await
getOpenAIAuth
({
const
openAIAuth
=
await
getOpenAIAuth
({
email
:
process
.
env
.
EMAIL
,
email
:
process
.
env
.
OPENAI_
EMAIL
,
password
:
process
.
env
.
EMAIL
password
:
process
.
env
.
OPENAI_PASSWORD
})
})
const
api
=
new
ChatGPTAPI
({
...
openAIAuth
})
const
api
=
new
ChatGPTAPI
({
...
openAIAuth
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment