Is it possible to connect openai api with web?

Hi everyone!. I have problem. ChatGPT has the ability to search the Internet for additional information if you use the temporary trial version 4o. But when I use openai api in node js and specify the 4o model, then if I ask some question, for example, “What day is it today?”, then it says that it does not have the ability to find the date or displays the wrong date.
The question is, is it possible to connect openai api to the Internet?
If not, can you show where it is written in the documentation, and if so, how?

Hi!

No, unfortunately it can’t. The tricky part is that it sometimes seems like it works. But it really doesn’t.

We have a similar recent thread here: Can gpt-4o access internet when using the API?

Might be worth noting that not even chatgpt uses the internet for that; they just put today’s date into the system prompt, and that’s that - you can easily do that with node too.

The answer here would be yes - but you need to implement it yourself. You need to create a function or tool or some other injection that handles internet browsing. There’s unfortunately no current easy way to do this for general web browsing as far as I’m aware - your best bet would be to implement scrapers for the sites you want to visit.

When GPT 3 chat api came out I’ve build something where I asked the api to find me topics of wikipedia, then I took data from that and made a second request that included the summarized content of the wikipedia pages.
You can of course also add other api e.g. google search or maps api and enrich the second prompt in realtime.

Prompt would be like:

Here are some information to concider when answering

[the summarized or structured data]

the user asked:

[prompt]

1 Like