How to call OpenAI API in CustomGPT – API


I’ve created a CustomGPT I want to offer to users in the store.

In the playground, I specified the right parameters to get it to do a single thing very well (at least for a 0.0.1 version).

I was able to use the OpenAI API to recreate this process in my own application.

Now I want to be able to let my CustomGPT call the same model + temperature parameters with a custom action, so users can access the same model + function in the GPT Store.

How can I do this?

It’s as simple as: use x model with y parameters with z instructions to get desired result.

I just haven’t seen this exact use-case resolved anywhere else, so might as well ask.

First, compare API to ChatGPT and see if you don’t really want to move all to the API, to have your own chatbot, instead of paying for countless API usage for users who have to pay for a subscription already:

Assistants in API is an analogue to GPT, but the instructions you place directly control the model, instead of coming from the perspective of “GPT programming” wrapped in other text.

With assistants (or chat completions for direct model access), you can choose the AI model, where as ChatGPT Plus users get “whatever thing called GPT-4 that OpenAI provides or is testing”.

The only commonalities shared are the code interpreter.

GPT’s files and iterative file browsing are replaced by a semantic search function on a vector store.

Actions to an API are replaced by tool calls to your own code.

A web browser tool is not available, nor any internet access method at all that you don’t provide yourself.

To make a GPT that can call an external API, you must use actions. It would be a tool that the GPT AI may decide to use, or not, writing the API request arguments.

You must set up an API server to handle the requests, that then makes the language calls to an AI model to return the promised information.

Do you really want to be in the business of providing free AI services on demand to OpenAI’s subscribers?

I’ve been considering this, and if there is anyway around it.

The service I could provide is valuable for a specific use-case, and it could be a good prototype of what I could develop further.

I was hoping there was a solution to this issue without having to run an API server (since it all takes place inside OpenAI’s platform).

And, since we have to ask permission before an action takes place anyway, it should be possible to create an action that utilizes the user’s own credits to take place.

Since the end-user would be the one benefitting from the tool, why does the creator have to be the one to pay?

Seems like a missed opportunity.



Source link

Leave a Comment