ChatGPT Conversation Action

Deleted old and installed that latest version, but this happens with Drafts:

Chat failed with HTTP status 429.

Body:
{
    "error": {
        "message": "You exceeded your current quota, please check your plan and billing details.",
        "type": "insufficient_quota",
        "param": null,
        "code": null
    }
}

And yes, same API for the other apps which work.

There you go, a new version that shows tokens usage and cost, with an option in template tags to enable it or not.

image

I didnā€™t notice your previous reply about the app.displayInfoMessage method. I thought the only way to display some information was the alert function, which is why I believed it would be intrusive. Now we are on the same page, thanks again for your guidance.

1 Like

Get the same error; what is the fix ?

Following the ā€˜Usageā€™ link OpenAI API provided by @agiletortoise the page shows my ā€˜grantā€™ expired on 1 April. On the Pricing page, it says, ā€œStart for free: Start experimenting with $5 in free credit that can be used during your first 3 months.ā€ I assume free use of the API is restricted by time (3 months) and/or credit ($5). There is also a note that the use of ChatGPT (web) and the API are priced separately. So buying the Premium plan wonā€™t allow the use of the API.

Hello! thanks for making this excellent action!
Is there a way to use this with the gpt-4 model?
I tired changing the Template Tag to gpt-4, but this told me that the model does not exist.
Any ideas how I can make this work?
Thanks!

Does your API key have access to GPT-4? Itā€™s still limited access and you have to get on a waitlist to request access.

OMG - I am so stupid! Sorry for bothering you. I somehow thought that because I am paying for API usage, that I automatically have access to GPT-4.
Thank you for your quick reply!

1 Like

Hello! I have a seperate API key with access to GPT-4 now.
I would like to set up two separate ChatGPT Conversation Actions, one for GPT-3.5-turbo, and one for GPT-4, using credentials for multiple accounts. Could this work using the ā€œCredential Identifier field" method? And if yes, where and how would I need to insert the ā€œCredential Identifierā€ in the script? Thank you very much in advance and I hope this time around my question is not as dumb as last time :wink:

This action talks directly to OpenAI and does not use Drafts built-in OpenAI scripting, it is storing itā€™s own custom API key using the credential system, but not sharing the ā€œOpenAIā€. To have a copy of it use a different API, you would only need to alter the first line to use a different initializer for the Credential object with a different name - this change at the beginning of the script should do it:

// change this line...
const credential = Credential.create('ChatGPT Conversation', "Credentials for ChatGPT Conversation");

// to this...
const credential = Credential.create('ChatGPT Conversation (GPT-4)', "Credentials for ChatGPT Conversation");

Note the first string parameter passed it changed. What you change it to does not really matter - but thatā€™s how it will appear in Settings > Credentials if you ever need to reset it.

1 Like

This works perfectly. Thank you very much and greetings from Spain!

Hi folks! Hope you are fine! I have got a problem with the ChatGPT Conversation Action and the API call! It stops working with this message: Chat failed with HTTP status -1.

Body:
undefined

It pops up when running this action right after prompting and with context prompting. Also resetted the API key. Changed the network (wifi / mobile /). No success.

Maybe someone can give me a hint or advice? Greetings!

requests have been timing out for a few hours, from Mac and from iOS. openAI seems to be doing just fine on their website. Did they change something with how API requests work?

I just did a couple of tests, including just from the command-line, and OpenAIā€™s API seems to not be responding in any kind of timely fashion today. :man_shrugging:

thanks for checking - glad itā€™s not just me. Iā€™m guessing nothing to do but wait then.

If you check their status site, you can check on known issues.

They had an event recently and post event they have been noting troubles that they believe is due to the enhanced interesting their services.

Hello everyone, itā€™s been a while! Iā€™m pleased to see so many of you making use of this action.

Today, Iā€™ve implemented a few minor updates, which include:

  • Utilizing Draftā€™s built-in OpenAI integration, rather than manually written HTTP calls
  • Updating the model pricing to the most recent
  • Changing the default model from gpt-3.5 to gpt-4

Thank you for your appreciations!

Iā€™ve installed this plug-in and added my API key, switched the model back to GPTChat-3.5 (since Iā€™m using the free version) and I get the following error:
Chat failed with HTTP status 404.

Body:
{
ā€œerrorā€: {
ā€œmessageā€: ā€œThe model gpt-3.5 does not exist or you do not have access to it.ā€,
ā€œtypeā€: ā€œinvalid_request_errorā€,
ā€œparamā€: null,
ā€œcodeā€: ā€œmodel_not_foundā€
}
}

I changed to 3.5 by editing the action and then edited the template and changed the gpt-4 to gpt-3.5. Any idea what Iā€™m doing wrong?

Try gpt-3.5-turbo

That should point to the most current 3.5 version. You can find all the valid model names in the API docs:

https://platform.openai.com/docs/models/gpt-3-5-turbo

1 Like

Ah, ok that made a difference, but now Iā€™m getting the 429 ā€œinsufficient_quotaā€ error. I thought version 3.5 was free to use now?
Maybe itā€™s only free if you use it from their website and not an API?

Take a look at the following for info on API use and pricing:

1 Like