-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(generative-ai): add url endpoints for compass web usage COMPASS-8376 #6423
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
const atlasMetadata = connectionInfo?.atlasMetadata; | ||
if (!atlasMetadata) { | ||
throw new Error( | ||
"Can't perform generative ai request: atlasMetadata is not available" | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit: I guess we never expect the requests with the cloud preset to be done when metadata is missing, so maybe this check be moved to the top of the if to make this clearer
…s before connecting, remove extra check
COMPASS-8376
These endpoints don't exist yet in Atlas, so they may be subject to change a little. I'll open a follow up pr if so. This pr is focuses on making these urls configurable by the consumer of the Atlas AI service (web vs electron).
Ideally these would use the same endpoint, however, as mentioned in a comment in the code, we cannot do UI calls against the admin API at the moment (CLOUDP-251201).
Testing wise we have e2e tests for the endpoints being used in Compass, and existing unit tests. We'll be adding e2e tests for Compass web gen ai in COMPASS-8395. Also a quick manual test worked.