Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/compass-generative-ai/src/atlas-ai-service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ describe('AtlasAiService', function () {
userInput: 'test',
collectionName: 'test',
databaseName: 'peanut',
sampleDocuments: [{ test: '4'.repeat(600000) }],
sampleDocuments: [{ test: '4'.repeat(5120001) }],
requestId: 'abc',
signal: new AbortController().signal,
});
Expand All @@ -231,7 +231,7 @@ describe('AtlasAiService', function () {
{ a: '1' },
{ a: '2' },
{ a: '3' },
{ a: '4'.repeat(500000) },
{ a: '4'.repeat(5120001) },
],
requestId: 'abc',
signal: new AbortController().signal,
Expand Down
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 request is too large. Please use a smaller prompt or try using this feature on a collection with smaller documents.',
],
[
'TOO_MANY_REQUESTS',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ const AIError = ({
// able to fix the issue on their own it cases where the schema is too big.
return (
<>
Sorry, your collections have too many fields to process. Please try
Sorry, your request is too large. Please use a smaller prompt or try
using this feature on a collection with smaller documents.
</>
);
Expand Down
Loading