Skip to content

Commit 89b8dbc

Browse files
committed
fixup: move the config to the atlas-ai-service with one prop
1 parent 39cf6e7 commit 89b8dbc

File tree

7 files changed

+434
-357
lines changed

7 files changed

+434
-357
lines changed

packages/compass-aggregations/src/modules/pipeline-builder/pipeline-ai.ts

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -281,20 +281,23 @@ export const runAIPipelineGeneration = (
281281

282282
const { collection: collectionName, database: databaseName } =
283283
toNS(namespace);
284-
jsonResponse = await atlasAiService.getAggregationFromUserInput({
285-
signal: abortController.signal,
286-
userInput,
287-
collectionName,
288-
databaseName,
289-
schema,
290-
// Provide sample documents when the user has opted in in their settings.
291-
...(provideSampleDocuments
292-
? {
293-
sampleDocuments,
294-
}
295-
: undefined),
296-
requestId,
297-
});
284+
jsonResponse = await atlasAiService.getAggregationFromUserInput(
285+
{
286+
signal: abortController.signal,
287+
userInput,
288+
collectionName,
289+
databaseName,
290+
schema,
291+
// Provide sample documents when the user has opted in in their settings.
292+
...(provideSampleDocuments
293+
? {
294+
sampleDocuments,
295+
}
296+
: undefined),
297+
requestId,
298+
},
299+
connectionInfo
300+
);
298301
} catch (err: any) {
299302
if (signal.aborted) {
300303
// If we already aborted so we ignore the error.

0 commit comments

Comments
 (0)