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
1e060b7b
Commit
1e060b7b
authored
Oct 31, 2023
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
js
parent
6733ade3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
build/index.js
build/index.js
+8
-8
build/index.js.map
build/index.js.map
+1
-1
src/chatgpt-api-browser.ts
src/chatgpt-api-browser.ts
+3
-2
No files found.
build/index.js
View file @
1e060b7b
...
@@ -1580,12 +1580,7 @@ var ChatGPTAPIBrowser = class extends AChatGPTAPI {
...
@@ -1580,12 +1580,7 @@ var ChatGPTAPIBrowser = class extends AChatGPTAPI {
force_paragen
:
false
,
force_paragen
:
false
,
force_rate_limit
:
false
,
force_rate_limit
:
false
,
history_and_training_disabled
:
false
,
history_and_training_disabled
:
false
,
suggestions
:
[
suggestions
:
[
"
0
"
,
"
1
"
,
"
2
"
,
"
3
"
],
"
0
"
,
"
1
"
,
"
2
"
,
"
3
"
],
timezone_offset_min
:
-
480
timezone_offset_min
:
-
480
};
};
if
(
conversationId
)
{
if
(
conversationId
)
{
...
@@ -1621,8 +1616,13 @@ var ChatGPTAPIBrowser = class extends AChatGPTAPI {
...
@@ -1621,8 +1616,13 @@ var ChatGPTAPIBrowser = class extends AChatGPTAPI {
}
}
}
}
try
{
try
{
const
reqProm
=
this
.
_page
.
waitForResponse
((
res
)
=>
res
.
url
()
===
"
https://tcr9i.chat.openai.com/fc/gt2/public_key/3D86FBBA-9D22-402A-B512-3420086BA6CC
"
,
{
timeout
:
1
e4
});
const
reqProm
=
this
.
_page
.
waitForResponse
(
const
textarea
=
await
this
.
_page
.
waitForSelector
(
'
textarea[id="prompt-textarea"]
'
);
(
res
)
=>
res
.
url
().
startsWith
(
"
https://tcr9i.chat.openai.com/fc/gt2/public_key/
"
),
{
timeout
:
1
e4
}
);
const
textarea
=
await
this
.
_page
.
waitForSelector
(
'
textarea[id="prompt-textarea"]
'
);
await
textarea
.
type
(
"
a
"
);
await
textarea
.
type
(
"
a
"
);
await
this
.
_page
.
keyboard
.
press
(
"
Backspace
"
);
await
this
.
_page
.
keyboard
.
press
(
"
Backspace
"
);
const
req
=
await
reqProm
;
const
req
=
await
reqProm
;
...
...
build/index.js.map
View file @
1e060b7b
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/chatgpt-api-browser.ts
View file @
1e060b7b
...
@@ -559,8 +559,9 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI {
...
@@ -559,8 +559,9 @@ export class ChatGPTAPIBrowser extends AChatGPTAPI {
const
reqProm
=
this
.
_page
.
waitForResponse
(
const
reqProm
=
this
.
_page
.
waitForResponse
(
(
res
)
=>
(
res
)
=>
res
.
url
()
===
res
'
https://tcr9i.chat.openai.com/fc/gt2/public_key/3D86FBBA-9D22-402A-B512-3420086BA6CC
'
,
.
url
()
.
startsWith
(
'
https://tcr9i.chat.openai.com/fc/gt2/public_key/
'
),
{
timeout
:
10000
}
{
timeout
:
10000
}
)
)
// get text area
// get text area
...
...
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