ChatGPT error: Not enough tokens available to send the assistant message and the user message

Symptoms

When using the ChatGPT Conversation action, you see an error message stating, "Not enough tokens available to send the assistant message and the user message." You will see this error in the Zap editor when you test your ChatGPT step or in Zap history after your Zap runs. 

Causes

This error happens when the token limit of the context window is exceeded due to the length of your input. Your input is the data added to these fields:

  • User Message
  • Assistant Instructions

The size of the context window varies depending on the specific model you’ve selected in your Zap.

How to fix it

To fix the issue, follow these steps:

Review the model's content window limit
Review your token usage
Adjust your input length
  • Limit the length of your inputs in the User Message and Assistant Instructions fields to key information.
  • If you are working with a large set of data, add a Formatter step before your ChatGPT step. This will allow you to split your text into chunks to use in your AI prompt.
Select an alternative model
  • In your Zap, select another model with a larger context window to accommodate longer inputs.
Was this article helpful?
0 out of 1 found this helpful