Logo

anyscale

#410000

validation_error

Invalid configuration: 'top_p' must be set to 1 when using greedy sampling. Please adjust your settings accordingly.

This error has been identified and solved.

Reason

The 400 status error you are encountering in the Anyscale API, specifically the PromptTooLongError, is due to the following reasons:

Input Length Exceeds Maximum Limit

The input you are sending exceeds the maximum allowed input length. In this case, the API received 7226 tokens, but the maximum input length is 4096 tokens.

Client Error

This error is a client error, indicating that there is an issue with the request body or the values in the request. The error message typically provides details on what was wrong with the request, such as the specific parameter or field that caused the error.

Solution

To fix the 400 status error in the Anyscale API due to the input exceeding the maximum allowed length, you need to adjust the length of your input data. Here are the key steps:

  • Reduce the number of tokens in your input to be within the 4096 token limit.

  • Ensure that any messages or completions do not collectively exceed this limit.

  • Verify that all fields and parameters in your request comply with the API's specifications.

Key Actions:

  • Shorten the input data to fit within the 4096 token limit.

  • Review and adjust any long messages or completion requests.

  • Validate all request parameters to ensure compliance with API requirements.

Original Error Message

Raw

Invalid configuration: 'top_p' must be set to 1 when using greedy sampling. Please adjust your settings accordingly.

Original Error Message

Raw

Invalid configuration: 'top_p' must be set to 1 when using greedy sampling. Please adjust your settings accordingly.

Suggested Links

https://github.com/ray-project/ray/issues/31370 http://6.anychart.com/products/stock/docs/users-guide/resizing-modes.html?fromtree https://github.com/ai-genie/chatgpt-vscode/issues/44 https://forum.bubble.io/t/why-do-api-connector-requests-sometimes-return-a-400-error/321731 https://docs.anyscale.com/endpoints/fine-tuning/dataset-prep/

© 2024 Portkey, Inc. All rights reserved

HIPAA

COMPLIANT

GDPR

Transform Your AI app prototypes to be production-ready

Talk to us →