Commit 1e060b7b authored by nanahira's avatar nanahira

js

parent 6733ade3
......@@ -1580,12 +1580,7 @@ var ChatGPTAPIBrowser = class extends AChatGPTAPI {
force_paragen: false,
force_rate_limit: false,
history_and_training_disabled: false,
suggestions: [
"0",
"1",
"2",
"3"
],
suggestions: ["0", "1", "2", "3"],
timezone_offset_min: -480
};
if (conversationId) {
......@@ -1621,8 +1616,13 @@ var ChatGPTAPIBrowser = class extends AChatGPTAPI {
}
}
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 textarea = await this._page.waitForSelector('textarea[id="prompt-textarea"]');
const reqProm = this._page.waitForResponse(
(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 this._page.keyboard.press("Backspace");
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 {
const reqProm = this._page.waitForResponse(
(res) =>
res.url() ===
'https://tcr9i.chat.openai.com/fc/gt2/public_key/3D86FBBA-9D22-402A-B512-3420086BA6CC',
res
.url()
.startsWith('https://tcr9i.chat.openai.com/fc/gt2/public_key/'),
{ timeout: 10000 }
)
// 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