/llm-fast-query

Primary LanguageJavaScriptMIT LicenseMIT

LLMFastQuery

Query popular web LLMs directly in your address bar with bard/query and cgpt/query.

You must be logged in to the LLM web UI for this to work.

NOTE: This is a third party extension and is not associated with Google or OpenAI in any way.

demo showing the extension

Installation

Chrome Webstore

You can install the manifest v3 version of this extension directly from the Chrome Webstore here.

Source

You can install either manifest version from source:

  1. git clone https://github.com/jbmlaird/llm-fast-query.git
  2. In Chrome, go to chrome://extensions/
  3. Click Load Unpacked
  4. Navigate inside the folder where you downloaded llm-fast-query, open the manifest_v2 or manifest_v3 folder, then click Select
  5. In your address bar type bard/why is this extension so good? or cgpt/how is Josh Laird such a legend?. Make sure you click the URL option, not the Google Search option (see gif below)

url_not_google_search.jpg

FAQ

Why am I getting Google search results entering bard/ and cgpt/ rather than being redirected?

Make sure you're pressing the URL option, not the Google Search option (see step 5 above).

Should I install Manifest v2 or v3 from source?

Manifest v2 is deprecated and will be phased out in 2023. In line with the security, privacy, and performance improvements with manifest V3, blocking web requests have been replaced with the Declarative Net Request API (see more here) which is more private.

Why include manifest v2?

I was curious how this would work in both versions. Both are included purely for academic reasons; one can see steps required to migrate.

Why is the code so bad?

This was a quick side project and I only write JavaScript when I have to 💀 PRs are welcome!

Where are the tests?

you_write_tests_question_mark_meme

Why didn't you use the Omnibox API for a nicer user experience?

The Omnibox API allows you to directly manipulate the address bar like having Search Bard or Search ChatGPT on the left:

omnibox gif

Unfortunately, the Omnibox API only supports one keyword. Ideally, I'd want a keyword for Bard and another keyword for ChatGPT that forwards to the relevant chat bot. However, since only one keyword is supported, one would need to type in llmfq (or some other keyword) then (bard|cgpt) how many Korok seeds are in Tears of the Kingdom? and the extension would forward depending on the first word. The user would need to remember an additional abbreviation ☠️

You can, however, set it up like in the GIF manually by using site search shortcuts.

  1. Go to chrome://settings/searchEngines in Chrome
  2. Scroll down to Site Search and click Add

site search page on Chrome

  1. Enter details for both Bard & ChatGPT as per the pictures:

Bard details

ChatGPT details

  1. Enter bard or cgpt into your address bar and press tab
  2. Query away 🚀

Will this extension work forever?

Definitely not. As soon as the websites change the JS selector for their respective text box, this will break. Feel free to create an issue or pull request if that happens.