diff --git a/backend/slingbase/src/main/java/com/composum/ai/backend/slingbase/AICreateServlet.java b/backend/slingbase/src/main/java/com/composum/ai/backend/slingbase/AICreateServlet.java index 9e43e1cff..9502a8040 100644 --- a/backend/slingbase/src/main/java/com/composum/ai/backend/slingbase/AICreateServlet.java +++ b/backend/slingbase/src/main/java/com/composum/ai/backend/slingbase/AICreateServlet.java @@ -254,7 +254,7 @@ protected void doPost(@NotNull SlingHttpServletRequest request, @NotNull SlingHt GPTConfiguration mergedConfig = GPTConfiguration.ofRichText(richtext).merge(config); Integer maxTokensParam = getOptionalInt(request, response, PARAMETER_MAXTOKENS); - int maxtokens = maxTokensParam != null ? maxTokensParam : 2000; // some arbitrary default + int maxtokens = maxTokensParam != null ? maxTokensParam : 1000; // some arbitrary default if (isNotBlank(textLength)) { Matcher matcher = Pattern.compile("\\s*(\\d+)\\s*\\|\\s*(.*)").matcher(textLength); if (matcher.matches()) { // maxtokens can be encoded into textLength, e.g. "1000|Several paragraphs of text"