Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
8 changes: 2 additions & 6 deletions packages/atlas-service/src/atlas-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@ export class AtlasService {
) {
this.config = getAtlasConfig(preferences);
}
adminApiEndpoint(path?: string, requestId?: string): string {
const uri = `${this.config.atlasApiBaseUrl}${normalizePath(path)}`;
const query = requestId
? `?request_id=${encodeURIComponent(requestId)}`
: '';
return `${uri}${query}`;
adminApiEndpoint(path?: string): string {
return `${this.config.atlasApiBaseUrl}${normalizePath(path)}`;
}
cloudEndpoint(path?: string): string {
return `${this.config.cloudBaseUrl}${normalizePath(path)}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,20 +281,23 @@ export const runAIPipelineGeneration = (

const { collection: collectionName, database: databaseName } =
toNS(namespace);
jsonResponse = await atlasAiService.getAggregationFromUserInput({
signal: abortController.signal,
userInput,
collectionName,
databaseName,
schema,
// Provide sample documents when the user has opted in in their settings.
...(provideSampleDocuments
? {
sampleDocuments,
}
: undefined),
requestId,
});
jsonResponse = await atlasAiService.getAggregationFromUserInput(
{
signal: abortController.signal,
userInput,
collectionName,
databaseName,
schema,
// Provide sample documents when the user has opted in in their settings.
...(provideSampleDocuments
? {
sampleDocuments,
}
: undefined),
requestId,
},
connectionInfo
);
} catch (err: any) {
if (signal.aborted) {
// If we already aborted so we ignore the error.
Expand Down
Loading
Loading