How to connect chatgpt 4 to the internet using the api?

The use of chatgpt is already widespread here. But someone would really like to make two big contributions:

  1. How to connect chatgpt 4 to the internet using the api?

  2. How to consume data from a link, such as a website, in order to create summaries or other interesting things using chatgpt?

Anyone who is very good at bubble, gpt and api, help people in the community to create more solid solutions in bubble, please.

Sorry for being overly optimistic, but there are bound to be some volunteers.

I’m pretty sure chatgpt is connected to the internet…but trying to understand your question, are you asking how to make it so chatgpt can access the internet in real time, to perform real time search to find real time data on the internet to be used within the chatgpt responses and not just be limited to the data it was trained on (only up to 2021)?

Use a webscrapping tool

This might be exactly what you’re looking for.

  1. Use GPT-3.5 to generate a search engine query for a message
  2. Use a SERP API to search Google / Bing for relevant websites using the search query generated above
  3. Pass the top results URLs to this API as well as the user’s original message
  4. API returns relevant chunks of text from the URLs that you insert into prompt
  5. ChatGPT answers based on the retrieved text.

See here for example, suppose we provided the URL of this news article and the user’s message shown in the screenshot:

It provides the answer in the first chunk of text returned ‘Gurman expects an early 2024 launch for the larger Pro laptops — perhaps in late January or early February’

The integration of that example would be

  1. 'Generate a relevant search query to find the answer to the user’s question: ‘when will the M3 macbook pro be released’ → GPT returns ‘m3 macbook pro release date’ as the search query
  2. We search Google using this search query and the Tom’s Guide article is the first one returned
  3. Pass that URL to the API
  4. API uses the message and the URL to return the relevant text
  5. We insert the top 3 or so chunks into the prompt.

Demo here: Demos | Not Quite Unicorns

Hope it helps and it’s free!