Silver Ringvee
Silver Ringvee

Reputation: 5545

How to get real-time data such as news, weather, etc. from the OpenAI model?

I wrote a prompt that gives me a daily update on local news, global news, weather, etc. Works really well in ChatGPT Plus when using the gpt-4o model.

Now, I wanted to automate it using the OpenAI API with the gpt-4o model. What it came back with was that it can’t get the news or even know the date really. I gave it today’s date manually, but still no luck.

Is there any way to accomplish this seemingly simple task with the OpenAI API?

I have paid versions of both.

Upvotes: 1

Views: 519

Answers (1)

Rok Benko
Rok Benko

Reputation: 23088

ChatGPT can do some things that are harder to achieve with the OpenAI API. In the early days, the main difference was that ChatGPT had chat history, which the API didn’t. Today, ChatGPT still uses OpenAI models but has been upgraded with more features.

You need to enhance the OpenAI API with web search tools made for LLMs, like Exa or Tavily. These tools allow you to connect an LLM to the web. I’ve personally tested both and can confirm they worked for getting current weather and news when added to an LLM.

Upvotes: 1

Related Questions