Commit 1e060b7b authored by nanahira's avatar nanahira

js

parent 6733ade3
...@@ -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: 1e4 }); 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: 1e4 }
);
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;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment