Class GPTException.GPTContextLengthExceededException

  • All Implemented Interfaces:
    Serializable
    Enclosing class:
    GPTException

    public static class GPTException.GPTContextLengthExceededException
    extends GPTException
    
     {
       "error": {
         "message": "This model's maximum context length is 4097 tokens. However, you requested 4671 tokens (1203 in the messages, 3468 in the completion). Please reduce the length of the messages or completion.",
         "type": "invalid_request_error",
         "param": "messages",
         "code": "context_length_exceeded"
       }
     }
     
    See Also:
    Serialized Form
    • Constructor Detail

      • GPTContextLengthExceededException

        public GPTContextLengthExceededException​(String message)