text-generation-webui icon indicating copy to clipboard operation
text-generation-webui copied to clipboard

Google Search Engine integration

Open minipasila opened this issue 2 years ago • 3 comments

It'd be cool if you could somehow integrate BingAI like search feature to use these models with. That way they could give you more accurate/up-to-date information etc. Useful links: https://developers.google.com/custom-search/v1/introduction https://programmablesearchengine.google.com/ It was also implemented here but using OpenAI's APIs

minipasila avatar Mar 05 '23 15:03 minipasila

I stumbled on this today and I assume this would also belong in that list https://github.com/michaelthwan/searchGPT

Spencer-Dawson avatar Mar 08 '23 02:03 Spencer-Dawson

I don't know how searchGPT does it, but I guess you could

  1. Query the search engine with the initial prompt
  2. Download the top N pages using requests (N = 2 or 3 by default)
  3. Summarize those N pages one by one with BART
  4. Concatenate the individual summaries summarize again. The goal of the two-step summarization is to obtain a more robust end result.
  5. Put that at the top of the prompt, followed by the original question
  6. Let the LLM autocomplete this augmented prompt

I'm too lazy to do it but you could do it with an extension. It would be worth it to try a few examples and check if using N > 1 makes a difference.

oobabooga avatar Mar 08 '23 02:03 oobabooga

If this is implemented then there should be an easy way to enable/disable it for users that don't want their prompt to be sent to google, for privacy reasons. An extension would be great because that could be easily disabled/enabled and users could decide if they want that functionality or not.

cyperium avatar Mar 09 '23 13:03 cyperium

This issue has been closed due to inactivity for 30 days. If you believe it is still relevant, please leave a comment below.

github-actions[bot] avatar Apr 08 '23 23:04 github-actions[bot]

this looks interesting https://github.com/oobabooga/text-generation-webui/discussions/932#discussion-5059588

minipasila avatar Apr 09 '23 16:04 minipasila