Can you use plugins in gpt-4 over API?

Hello, is there any way to call gpt-4 over the API with a plugin enabled? If not, is there any workaround like manually inserting a prompt describing the plugin?

2 Likes

No. But, why would you want to?

You have completed control when you use the API. In essence, you can recreate complete functionally of any plugin and more but just providing the model with a list of commands it can use which include a terminating stop sequence.

Parse the output looking for a command, execute whatever command the model wanted to run, then resubmit the prompt and the response to that point with the result of the executed command for the model to continue from.

While the API does provide extensive control, integrating plugin functionality, such as the browsing tool, could enhance applications that require real-time web data. It would streamline the process of issuing search queries, parsing results, and quoting relevant information, enhancing efficiency in applications like a Virtual Research Assistant.

1 Like

I needed the browsing plugin to be accessible over API

1 Like

I have a github repository, llmsearch, that I use as a plugin in preference to the openai search plugin. I also use it with the api. As @elmstedt said, just parse api output and call your own hosted search instead.
llmsearch supports a pretty simple rest interface, so if you don’t mind hosting it yourself, it can provide pretty complete web search (including images, urls returned along with text extract, etc etc).

3 Likes

Any update on this? I also need gpt-4 to browse and crawl websites

When using the API you can make GPT-4 do anything you want, you just need to write it yourself.

1 Like

you just need to write it yourself

This is not an answer, or how any good product works

1 Like

Hi and welcome to the developer forum!

You could ask ChatGPT or one of the API models to create the code for you, but the API is a build it yourself system that allows you to build anything you want. In order to have that kind of flexibility it does not come with many pre-made things, there are lots of great examples over in the GitHub - openai/openai-cookbook: Examples and guides for using the OpenAI API

2 Likes

It is the answer and it’s exactly how a platform for developers works.

Sorry, OpenAI rejected my submission, so I only use it for personal use.
Never bothered to resubmit, I’ve moved on to other things.

So our use-case is that of a travel agent. There’s a plugin that searches flights for you, and we’d like to build a wrapper on top of that plugin.

I think the misunderstanding here is that some developers view the plugins, particularly if you’re not so well versed in LLMs, as an extension of GPT itself. We wouldn’t want to reinvent the wheel when we can see it already done within the chat. So it’d be a natural extension of that for this functionality to also be in the API.

Although theoretically you can use plugin from API, plugin authors most probably restrict the use to OpenAI calls only. If you really need their functionality, you can probably contact the authors to provide you with another endpoint/API to use.

Anyway, here is an API marketplace where you have access to different APIs from finance, flight tracking, etc. that you can use in your apps.