Troubleshooting of OpenAI API: Difference between revisions
Jump to navigation
Jump to search
(Created page with " === How to fix "The message you submitted was too long" === * Error message: "The message you submitted was too long, please reload the conversation and submit something shor...") |
|||
| Line 9: | Line 9: | ||
=== How to fix 'messages' is a required property === | === How to fix 'messages' is a required property === | ||
* Error message: 'messages' is a required property | |||
* Solution: Check the payload data if the messages property is exists | * Solution: Check the payload data if the messages property is exists | ||
=== How to fix None is not of type 'string' - 'messages.1.content' === | |||
* Error message: None is not of type 'string' - 'messages.1.content' | |||
* Example Input | |||
<pre> | |||
{ | |||
"model": "gpt-4", | |||
"max_tokens": 1000, | |||
"temperature": 0.9, | |||
"messages": [ | |||
{"role": "system", "content": "#zh-TW You are a helpful assistant. Help me to summarize the article"}, | |||
{"role": "user", "content": null} | |||
] | |||
} | |||
</pre> | |||
* Solution: The property messages.1.content should not be null e.g. | |||
<pre> | |||
{ | |||
"model": "gpt-4", | |||
"max_tokens": 1000, | |||
"temperature": 0.9, | |||
"messages": [ | |||
{"role": "system", "content": "#zh-TW You are a helpful assistant. Help me to summarize the article"}, | |||
{"role": "user", "content": "YOUR ARTICLE ... ..."} | |||
] | |||
} | |||
</pre> | |||
=== How to fix "The model `gtp-4` does not exist" === | === How to fix "The model `gtp-4` does not exist" === | ||
Revision as of 14:23, 3 April 2023
How to fix "The message you submitted was too long"
- Error message: "The message you submitted was too long, please reload the conversation and submit something shorter."
- Solution: Reduce the length of an input message to less than 15,000 characters. The exact characters limit is not listed on official document, 17,000 characters will not allowed in my experience[1].
How to fix "An error occurred"
- Error message: "An error occurred. If this issue persists please contact us through our help center at help.openai.com."
- Solution: Refresh the webpage https://chat.openai.com/chat
How to fix 'messages' is a required property
- Error message: 'messages' is a required property
- Solution: Check the payload data if the messages property is exists
How to fix None is not of type 'string' - 'messages.1.content'
- Error message: None is not of type 'string' - 'messages.1.content'
- Example Input
{
"model": "gpt-4",
"max_tokens": 1000,
"temperature": 0.9,
"messages": [
{"role": "system", "content": "#zh-TW You are a helpful assistant. Help me to summarize the article"},
{"role": "user", "content": null}
]
}
- Solution: The property messages.1.content should not be null e.g.
{
"model": "gpt-4",
"max_tokens": 1000,
"temperature": 0.9,
"messages": [
{"role": "system", "content": "#zh-TW You are a helpful assistant. Help me to summarize the article"},
{"role": "user", "content": "YOUR ARTICLE ... ..."}
]
}
How to fix "The model `gtp-4` does not exist"
- Error message: "The model `gtp-4` does not exist"
- Solution: Go to Models - OpenAI API the check the model list
How to fix "The server had an error while processing your request"
Error message:
The server had an error while processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if the error persists. (Please include the request ID XXXX1 in your message.)
Solution:
- Go to OpenAI Status to check if the server is outage
- Send an issue to OpenAI Help Center
強制保持繁體中文輸出
- 在問題前面加上 #zh-TW [2]
- 或「使用臺灣常用的繁體中文」