Logo

openai

#7710000

input_validation_error

Validation error for request: additional_instructions must not exceed 32768 characters.

This error has been identified and solved.

Reason

The 400 status error you are encountering in the OpenAI API is due to a validation error related to the length of the additional_instructions field in your request body. Specifically, the error message indicates that the additional_instructions value exceeds the maximum allowed length of 32,768 characters. This limitation is imposed by the OpenAI API to ensure that the request complies with its predefined constraints.

Solution

To fix the 400 status error due to the additional_instructions exceeding the maximum allowed length, you need to ensure that your request complies with the OpenAI API's character limits. Here are the steps to resolve this issue:

  • Trim or shorten the additional_instructions to be within the 32,768 character limit.

  • Break down large instructions into smaller chunks if necessary.

  • Verify that there are no unnecessary characters or whitespace in the instructions.

  • Test the request with the modified instructions to ensure compliance with the API's constraints.

Original Error Message

Raw

Validation error for request: additional_instructions must not exceed 32768 characters.

Original Error Message

Raw

Validation error for request: additional_instructions must not exceed 32768 characters.

Suggested Links

https://cheatsheet.md/chatgpt-cheatsheet/openai-api-error-axioserror-request-failed-status-code-400 https://community.openai.com/t/problem-with-assistant-max-length-32k-even-with-the-gpt-4-1106-preview-and-trying-to-get-the-status-i-get-a-passed-three-arguments-error-even-though-i-only-passed-two/479690 https://community.openai.com/t/getting-400-response-with-already-working-code/509212 https://github.com/langchain-ai/langchainjs/issues/2798 https://github.com/Nutlope/aicommits/issues/137

© 2024 Portkey, Inc. All rights reserved

HIPAA

COMPLIANT

GDPR

Transform Your AI app prototypes to be production-ready

Talk to us →