Data transfer to OpenAI node problem

Hi, Im a new user and my English is bad, but Ill try to explain my problem.

Describe the problem/error/question

I try to use OpenAI GPT to score title.

If I Send {{ $json.title }}, it very easy become “Error Code 429 - Rate limit reached for requests”: https://help.openai.com/en/articles/6891829-error-code-429-rate-limit-reached-for-requests

Maybe my prompt is to short, so it very easy over that limits.

So I change {{ $json.title }}, and try to give OpenAI node all data like this {{ $(“Code1”).all() }}

It run 12 times, it seems because the code node had 12 item. Okay I got it.

But why OpenAI node seem not get the data at all ?

What is the error message (if any)?

no

Please share your workflow

Share the output returned by the last node

[
{
“message”: {
“role”: “assistant”,
“content”: “I’m sorry, as an AI language model, I cannot provide a score for each title without knowing the titles. Please provide me with the titles so that I can assist you better.”
},
“finish_reason”: “stop”,
“index”: 0
},
{
“message”: {
“role”: “assistant”,
“content”: “I’m sorry, as an AI language model, I cannot provide a score for each title without knowing the titles. Please provide the titles so I can assist you better.”
},
“finish_reason”: “stop”,
“index”: 0
},
{
“message”: {
“role”: “assistant”,
“content”: “I’m sorry, as an AI language model, I cannot provide a score for each title without knowing the titles. Please provide the titles so I can assist you better.”
},
“finish_reason”: “stop”,
“index”: 0
},
{
“message”: {
“role”: “assistant”,
“content”: “I’m sorry, as an AI language model, I cannot provide a score for each title without knowing the titles. Please provide the titles so I can assist you better.”
},
“finish_reason”: “stop”,
“index”: 0
},
{
“message”: {
“role”: “assistant”,
“content”: “I’m sorry, as an AI language model, I cannot provide a score for each title without knowing the titles. Please provide the titles so I can assist you better.”
},
“finish_reason”: “stop”,
“index”: 0
},
{
“message”: {
“role”: “assistant”,
“content”: “I’m sorry, as an AI language model, I cannot provide a subjective score for each title. Can you please provide me with the titles so that I can format the JSON accordingly?”
},
“finish_reason”: “stop”,
“index”: 0
},
{
“message”: {
“role”: “assistant”,
“content”: “I’m sorry, as an AI language model, I cannot provide a score for each title without knowing the titles. Please provide the titles so I can assist you better.”
},
“finish_reason”: “stop”,
“index”: 0
},
{
“message”: {
“role”: “assistant”,
“content”: “I’m sorry, as an AI language model, I cannot provide a subjective score for each title. Can you please provide me with the titles so that I can format the JSON accordingly?”
},
“finish_reason”: “stop”,
“index”: 0
},
{
“message”: {
“role”: “assistant”,
“content”: “I’m sorry, as an AI language model, I cannot provide a score for each title without knowing the titles. Please provide the titles so I can assist you better.”
},
“finish_reason”: “stop”,
“index”: 0
},
{
“message”: {
“role”: “assistant”,
“content”: “I’m sorry, as an AI language model, I cannot provide a subjective score for each title. Can you please provide me with the titles so that I can format the JSON accordingly?”
},
“finish_reason”: “stop”,
“index”: 0
}
]

Information on your n8n setup

  • n8n version: 0.224.4
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: ubuntu

It`s me again, the problem is solved.

I found I can add a 5 second wait node to let it slow down.

Just like this.

2 Likes

It`s still me…

Sorry last workflow still dont work sometime, it still show Error Code 429.


Maybe the wait node only run 2 times.

And maybe if it have 15 item, the OpenAI node will send them all in once.

I try to open “Retry On Fail” seting “Wait Between Tries (ms)” in 5000 (5 second), and continue observe.

Its better now, and you can set "Max. Tries" in 5. (default is 3, and it cant over 5)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.