SearchGPT availability in API?

Anyone know if SearchGPT will be made available via the API?

I’m hoping it’s not tied to the GPT infrastructure and therefore proprietary and not able to be embedded into applications. If that’s the case everyone will of course just keep using Perplexity for API web search.

Here’s a random article in case people are unwaware:

2 Likes

I wouldn’t bet on it. The search function in ChatGPT has been around for quite a while now and I think OpenAI never communicated on bringing it to the API (anyone correct me if I’m wrong).

The API already supports custom tool calls, so it can be implemented into your app/code with relatively little work, which is probably why they wouldn’t support it themselves.

This is inevitably one of the first questions we get any time something new is released.

“Will completely new product be available in the API?”

Generally, the answer is “no,” for anything which appears to be consumer facing and this is definitely looking like a consumer product.

The other thing I’ll note is that in their announcement page they call it a,

We’re testing SearchGPT, a temporary prototype of new AI search features that give you fast and timely answers with clear and relevant sources.

It’s not clear to me if that means the product is temporarily in the “prototype” stage or if the entire existence of the prototype s “temporary” and they are planning on shutting it down relatively soon.

It has some real “research preview” vibes to it to me though, so who knows?

¯\(ツ)

5 Likes

They said that they are planning on integrating it into ChatGPT.

1 Like

That’s a very good point that this is doable by a simple “Tool Call”. I do all my API code thru LangChain so I can maintain “provider independence” so that my apps can always use any LLM Cloud Provider I want, including locally hosted LLMs.

So tbh, now that I think about it, using OpenAI’s “web search” would just be locking me into using OpenAI LLM exclusively (which I’ll never do), and as you point out, implementing this as a “Tool Call” is the most powerful approach. So if OpenAI makes this available in API that’s fine, but I will have it in my code via LangChain Agents and Tools regardless, and independently of anything OpenAI does.

1 Like

Cohere has a web search tool for use with its API. It works well enough with Google Apps-Script.
“connectors”: [{
“id”: “web-search”,
“options”: {
“site”: webSource
}

more at: Cohere web-search

2 Likes

I’m a bit skeptic about OpenAI opening it’s search API. Google Search engine makes hundreds of billions of dollars in ad revenue. But who knows?!

It’s quite easy to implement yourself using DuckDuckGo, which allows for scraping if you use their HTML UI, at which point it will return correct URLs.

The way we built it is by scraping DuckDuckGo, semantically parse the HTML (each search result has got specific CSS classes), which we then create a JSON payload out of and transmits to OpenAI upon the invocation of an “AI function.”

AI functions again, are our own internally built structure allowing OpenAI’s APIs to return JSON in a specific format to the caller, which our middleware will then use as the basis for executing internal methods in our API middleware.

You can read more about the general process here ==> How to Connect your AI Chatbot to the Internet | AINIRO.IO

The above article doesn’t cover everything you need to know, but combined with the comment here it should give you a starting ground for how to implement it yourself without requiring Search GPT API support …

I’m going to just assume that SearchGPT is powered by Bing and there are likely a mound of legal reasons why they can’t offer it directly via their API. It sounds like they’re having to do a lot of data deals to power SearchGPT which means all of that data is encumbered.

I bet it’s more about forcing viewing of ADs. If search is available thru the API that’s like the greatest AD Blocker ever invented, because apps could then consume search results without users being force-fed the ADs on a web page. Both Microsoft and Google of course would loose millions (billions?) if people were able to bypass ADs.

Now that it has been bolted onto ChatGPT - can someone check via the api if you can pull SearchGPT results?

1 Like

That is gpt they are asking api. I did a post about the gpt version

I’d like to know API also. :heart:
I got my hopes up when I saw the reply :rabbit::honeybee:

1 Like

I just checked, and the “4o” model API doesn’t know how to get up to date news on anything.

2 Likes

As stated here, the new model for searching the web with ChatGPT is a fine-tuned version of GPT-4o, not the regular version, and it leverages third-party search providers [such as Bing], we can assume this is pretty much just a function call and search isn’t a capability built into the model.

It wouldn’t make sense for the 4o model in the API to have web searching capabilities, but as stated a couple times on this thread the best approach is to implement it yourself through function calling.

2 Likes

My app allows users to select AI from Perplexity in addition to OpenAI, and many other models, so personally I could care less if OpenAI wants their API to have full search capability or not, because I can just select “Perplexity” option.

But this would be trivial for OpenAI to enable in their API, if they wanted to, and so if they never plan to it’s likely because of strategic business reasons, rather than any kind of technical challenges.

2 Likes

Definitely not some sort of technical challenge, I agree! Though I personally prefer how things are now, since instead of being reliant on one search engine/scraper that OpenAI provides I can implement my own and instruct the model to use it through Function Calling.

Maybe I’d like to use the Bing Web Search API for one project and the Brave Search API for another, maybe it’d like to go without web capabilities but still want to use gpt-4o-2024-08-06. I’m able to develop my own solutions the model can make use of (or use a preexisting solution from online like from this repo).

Here’s a good cookbook example - thanks EricGT for reminding me about this wonderful resource!

1 Like

Here a trick for those using the API and asking,

“Will completely new product be available in the API?” (ref)

Check the OpenAI cookbook for examples. When the o1 models came out the cookbook had a few o1 model examples ready to use.

Also check the cookbook examples as listed on GitHub examples as sometimes an example will be easier to find that way.

Enjoy!

2 Likes

I agree. A “use-web” boolean parameter is definitely needed, so the model can be forced to use a tool you provide it rather than having an unalterable desire to go to the web data source when it needs to search.

1 Like