Skip to content

Instantly share code, notes, and snippets.

@radermacher
Forked from b-nnett/boost.js
Last active August 28, 2023 10:55
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save radermacher/8b8e98a01cd131257428075887f87492 to your computer and use it in GitHub Desktop.
Save radermacher/8b8e98a01cd131257428075887f87492 to your computer and use it in GitHub Desktop.
Arc ChatGPT Boost
// fork of https://gist.github.com/b-nnett/2749adb44566239e4c85ad1a8937c2bc
// origin by @B_nnett → https://twitter.com/joshm/status/1648346253355282432?s=20
/*
To set up this boost for chat.openai.com:
1) open Arc browser and login at chat.openai.com.
2) Head over to the + button in your sidebar and select New Boost.
Or hit ⌘ + T and type New Boost into your Command Bar.
3) Click the `Code` button.
4) Click the `JS` tab at the top.
5) Copy and paste code of this gist.
6) Click the `Back` button at the top left.
8) Click `My Boost` at the top.
9) Click `Rename This Boost...`.
10) Name this boost however you like, for example, `ChatGPT`.
11) Click "OK" to save the name.
12) Close the Boost window.
Congrats you created your (first) Boost!
Last step: Add ChatGPT to your configured search engines with URL `https://chat.openai.com/?question=%s`
How? Read my comment here:
https://gist.github.com/radermacher/8b8e98a01cd131257428075887f87492?permalink_comment_id=4545939#gistcomment-4545939
Want to know more about Boosts? Check out this article:
https://resources.arc.net/en/articles/6808613-boosts-customize-any-website
*/
// This will run in the background
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function fillQuery() {
let url = new URL(document.location);
let question = url.searchParams.get('question');
if(!question) {
return;
}
await sleep(1000); // Pause for 1 second
let input = document.getElementById("prompt-textarea");
input.value = question;
input.dispatchEvent(new Event('input', {bubbles: true}));
let submit = document.querySelector("[data-testid=send-button");
submit.click();
}
fillQuery();
@radermacher
Copy link
Author

radermacher commented Apr 23, 2023

2023/07/14 → After changes by OpenAI, this boost no longer works 😔
2023/08/28 → After a contributed fix by @jamesreggio this boost is working again 🚀

This boost is intended to be used in combination with a site search configuration of Arc.

Open this URL in Arc to add ChatGPT as search engine to site search: arc://settings/searchEngines
If you are a ChatGPT Plus user, you can also specify GPT-4 as the model in the search URL - see screenshot:

Screenshot 2023-04-23 19 40 50

Search URL for copy and paste:
Default (GPT-3.5)
https://chat.openai.com/?question=%s

GPT-4 (atm ChatGPT plus user only):
https://chat.openai.com/?model=gpt-4&question=%s

GPT-4 with chat plugins enabled (atm ChatGPT plus user only):
https://chat.openai.com/?model=gpt-4-plugins&question=%s

Thank you, @ludwiktrammer, for your contribution.

Thank you @jamesreggio, for your fix

Update:
OpenAI made some changes to chat.openai.com, so it is no longer possible to select GPT-4 for your query in advance.
So I had to remove this option from this guidance.

@dimitribrooks
Copy link

This link does not work for GPT4 anymore -> https://chat.openai.com/?model=gpt-4&question=%s

@radermacher
Copy link
Author

This link does not work for GPT4 anymore -> https://chat.openai.com/?model=gpt-4&question=%s

Sadly, you're correct. OpenAI made a change, and it's no longer possible to open ChatGPT with GPT-4 preselected.
Until I find a new way, I will remove this option from my guidance.

Thanks for your comment about this!

@radermacher
Copy link
Author

This link does not work for GPT4 anymore -> https://chat.openai.com/?model=gpt-4&question=%s

Without changes of mine, it is working again! You can specifiy GPT-4 in the URL as described above.

@dimitribrooks
Copy link

dimitribrooks commented May 5, 2023

Without changes of mine, it is working again! You can specifiy GPT-4 in the URL as described above.

Yes I can confirm its working again! Thanks!

@ivoverzone
Copy link

This works great! I'm trying to adapt your solution to use on Whatsapp web.

I would like to use the search engine feature in order to open Whatsapp with a search of my conversations. So far, I haven't been successful. Would you have any recommendations?

@ludwiktrammer
Copy link

Version with chat plugins enabled:

https://chat.openai.com/?model=gpt-4-plugins&question=%s

@alibedar
Copy link

Can you provide an update for how to do this with the new Boost creator tool ? THANKS

@radermacher
Copy link
Author

@alibedar, updated!

@qru3lgod
Copy link

qru3lgod commented Jun 9, 2023

It is not working for GPT-3.5 😭

@radermacher
Copy link
Author

After changes by OpenAI, this boost no longer works. 😔

@jamesreggio
Copy link

@radermacher
Copy link
Author

thanks @jamesreggio for this fix. I updated this gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment