Skip to content

Commit 25abe51

Browse files
limit increased and message improved for PROMPT_TOO_LONG
1 parent 1df46fd commit 25abe51

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/compass-generative-ai/src/atlas-ai-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type GenerativeAiInput = {
2424

2525
// The size/token validation happens on the server, however, we do
2626
// want to ensure we're not uploading massive documents (some folks have documents > 1mb).
27-
const AI_MAX_REQUEST_SIZE = 100000;
27+
const AI_MAX_REQUEST_SIZE = 5120000;
2828
const AI_MIN_SAMPLE_DOCUMENTS = 1;
2929
const USER_AI_URI = (userId: string) => `unauth/ai/api/v1/hello/${userId}`;
3030
const AGGREGATION_URI = 'ai/api/v1/mql-aggregation';

packages/compass-generative-ai/src/components/generative-ai-input.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ describe('GenerativeAIInput Component', function () {
112112
],
113113
[
114114
'PROMPT_TOO_LONG',
115-
'Sorry, your collections have too many fields to process. Please try using this feature on a collection with smaller documents.',
115+
'Sorry, your prompt is too long and has exceeded the token limit. Please try using this feature with a shorter prompt.',
116116
],
117117
[
118118
'TOO_MANY_REQUESTS',

0 commit comments

Comments
 (0)