Custom GPT integration

Hi,

I’m looking for help on calling my Custom GPT please.

I have built the blocks for OpenAI but need the response to be from my Custom GPT in OpenAI.

Thank you

Hi and welcome to Thunkable.

Are you using the OpenAI API or the built-in OpenAI blocks in Thunkable? It helps if you share a screenshot of your blocks. The built-in blocks are quite limited so you’ll most likely need to do this with the Web API blocks.

Thank you.

I am using the blocks to call OpenAi
Screenshot 2024-07-04 08.31.29

The blocks are working fine and are returning the chat from OpenAI. That’s not my difficulty though.

The blocks return, I believe, the generic OpenAI chat. But what I need to return is what they call a Custom GPT (trained and fine-tuned version). So the blocks are fine but I’m looking for a solution that will return my Custom GPT within my OpenAI account.

Are you able to help? Any workable solution I can go with.

Thank you

Hello @carlfdunckeri
You can accomplish this using Web API blocks.
Here are some community posts:
[SOLVED] Open AI API with Chat GPT 40 - Questions about Thunkable / Issues / Bugs - Community
Open AI ChatGPT - Free Templates, Designs, and Block Combinations - Community (thunkable.com)
Open Ai source ChatGPT API undefined response - Questions about Thunkable - Community

This doesn’t produce a solution. There may be a misunderstanding as to what a customised GPT is. See here https://openai.com/index/introducing-gpts/

The solutions offered above relate to the standard GPT and date before this feature was launched by OpenAI.

What is needed is not only a working call to OpenAi - that element is fine - there needs to be a further elemnet which calls a specific and customised GPT.

For anyone finding this post, integrating a custom GPT into an environment outside of OpenAI cannot currently be done.

Thanks for support.

I copied your code and it worked but has suddenly stopped returning a response, why?

Has your OpenAI license expired? Are you over quota for responses? Are you getting an error message?

No error message and I still have $4.91 credit in OpenAI, I only started the Key on the 15th of this month so it surely is still relevant.

It’s working for me. The problem is that you’re setting an app variable to the API key but you need to set this block to the API key:

image

? I don’t quite understand how to set up the block? I had copied the one above and originally it worked fine.

In the code image you sent, it shows no proof of declaring the variable. You would have to set up the API key not through a variable, but through an OpenAI Services block.

The blocks in your screenshot will not work. So if it worked before then you either used the set ... API Key block or you configured the OpenAI key in the components menu. But one of those has to happen for this to work.

Your block might be named slightly different but this is where the SET block comes from: