Skip to content

Commit

Permalink
limit increased and message improved for PROMPT_TOO_LONG
Browse files Browse the repository at this point in the history
  • Loading branch information
ruchitharajaghatta committed Oct 15, 2024
1 parent 1df46fd commit 25abe51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/compass-generative-ai/src/atlas-ai-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type GenerativeAiInput = {

// The size/token validation happens on the server, however, we do
// want to ensure we're not uploading massive documents (some folks have documents > 1mb).
const AI_MAX_REQUEST_SIZE = 100000;
const AI_MAX_REQUEST_SIZE = 5120000;
const AI_MIN_SAMPLE_DOCUMENTS = 1;
const USER_AI_URI = (userId: string) => `unauth/ai/api/v1/hello/${userId}`;
const AGGREGATION_URI = 'ai/api/v1/mql-aggregation';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ describe('GenerativeAIInput Component', function () {
],
[
'PROMPT_TOO_LONG',
'Sorry, your collections have too many fields to process. Please try using this feature on a collection with smaller documents.',
'Sorry, your prompt is too long and has exceeded the token limit. Please try using this feature with a shorter prompt.',
],
[
'TOO_MANY_REQUESTS',
Expand Down

0 comments on commit 25abe51

Please sign in to comment.