Package net.stoerr.chatgpt.codevengine
Class RepeatedRequestChecker
- java.lang.Object
-
- net.stoerr.chatgpt.codevengine.RepeatedRequestChecker
-
public class RepeatedRequestChecker extends Object
It happens sometimes that ChatGPT goes into a loop, repeating the same request again and again, which destroys the current 3h quota. We block the 3rd try.
-
-
Field Summary
Fields Modifier and Type Field Description static RepeatedRequestChecker
CHECKER
static String
ERRORMSG
static int
MAX_REPETITIONS
-
Constructor Summary
Constructors Constructor Description RepeatedRequestChecker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkRequestRepetition(jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServlet servlet, Object... parameters)
-
-
-
Field Detail
-
ERRORMSG
public static final String ERRORMSG
- See Also:
- Constant Field Values
-
CHECKER
public static final RepeatedRequestChecker CHECKER
-
MAX_REPETITIONS
public static final int MAX_REPETITIONS
- See Also:
- Constant Field Values
-
-
Method Detail
-
checkRequestRepetition
public void checkRequestRepetition(jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServlet servlet, Object... parameters) throws ExecutionAbortedException
- Throws:
ExecutionAbortedException
-
-