Skip to content
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

feat: Google AI integration #29620

Merged
merged 5 commits into from
Dec 14, 2023
Merged

feat: Google AI integration #29620

merged 5 commits into from
Dec 14, 2023

Conversation

vivonk
Copy link
Contributor

@vivonk vivonk commented Dec 14, 2023

Description

Here's PR for adding Google AI Gemini model as a data source integration.
Features:

  1. Text generation based on text inputs

Fixes #29621

Type of change

  • New feature (non-breaking change which adds functionality)

Testing

How Has This Been Tested?

  • Manual
  • JUnit

Checklist:

Dev activity

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • PR is being merged under a feature flag

QA activity:

  • Speedbreak features have been covered
  • Test plan covers all impacted features and areas of interest
  • Test plan has been peer reviewed by project stakeholders and other QA members
  • Manually tested functionality on DP
  • We had an implementation alignment call with stakeholders post QA Round 2
  • Cypress test cases have been added and approved by SDET/manual QA
  • Added Test Plan Approved label after Cypress tests were reviewed
  • Added Test Plan Approved label after JUnit tests were reviewed

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Integrated Google AI plugin for advanced AI functionality.
    • Added Google AI plugin to the available plugins.
    • Implemented new commands and utilities for Google AI services.
  • Enhancements

    • Expanded plugin constants to include Google AI references.
    • Developed a method strategy for Google AI plugin execution.
  • Documentation

    • Updated plugin properties to include Google AI plugin details.
  • Database Changes

    • Performed a database migration to add the Google AI plugin to existing workspaces.

Copy link
Contributor

coderabbitai bot commented Dec 14, 2023

Walkthrough

Walkthrough

The overall change introduces a new Google AI Plugin to an existing Java application, likely an integration platform. This plugin includes constants, models, commands, utilities, and error handling specific to the Google AI services. A migration class has been added to insert the new plugin into the database and make it available across all workspaces. The updates span across constants definitions, plugin properties, command implementations, and utilities to facilitate interactions with Google AI APIs.

Changes

File Path Change Summary
.../constants/PluginConstants.java Added constants for Google AI plugin identification.
.../googleAiPlugin/.../GoogleAiPlugin.java Created GoogleAiPlugin class with an inner class GoogleAiPluginExecutor for Google AI API interactions.
.../googleAiPlugin/.../commands/GenerateContentCommand.java Added GenerateContentCommand class for content generation command handling.
.../googleAiPlugin/.../constants/GoogleAIConstants.java Introduced constants for Google AI API endpoints and models.
.../googleAiPlugin/.../constants/GoogleAIErrorMessages.java Added error messages specific to Google AI plugin operations.
.../googleAiPlugin/.../models/GoogleAIRequestDTO.java Added GoogleAIRequestDTO class with nested Content and Part classes for request data transfer objects.
.../googleAiPlugin/.../models/Role.java Introduced a new Role enum with a single role user.
.../googleAiPlugin/.../models/Type.java Added a new text type to the Type enum.
.../googleAiPlugin/.../utils/GoogleAIMethodStrategy.java Created a class to select Google AI commands based on method strategy.
.../googleAiPlugin/.../utils/RequestUtils.java Updated to include methods for web client creation, connection provider configuration, and API key validation.
.../googleAiPlugin/.../plugin.properties Added plugin definition properties for the Google AI plugin.
.../migrations/db/ce/Migration038AddGoogleAIPlugin.java Added migration class to insert the Google AI plugin into the database and workspaces.

Assessment against linked issues

Objective Addressed Explanation
Google AI Gemini Integration The changes introduce the Google AI Plugin, including classes, constants, and utilities specific to Google AI services, aligning with the objective of integrating Google AI functionality.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ?


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • You can reply to a review comment made by CodeRabbit.
  • You can tag CodeRabbit on specific lines of code or files in the PR by tagging @coderabbitai in a comment.
  • You can tag @coderabbitai in a PR comment and ask one-off questions about the PR and the codebase. Use quoted replies to pass the context for follow-up questions.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

@vivonk
Copy link
Contributor Author

vivonk commented Dec 14, 2023

/build-deploy-preview skip-tests=true

Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/7208044955.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 29620.
recreate: .

@github-actions github-actions bot added Enhancement New feature or request AI All tasks related to AI Appsmith Labs Task A simple Todo labels Dec 14, 2023
@vivonk vivonk assigned arunvjn and sondermanish and unassigned arunvjn Dec 14, 2023
Copy link

Deploy-Preview-URL: https://ce-29620.dp.appsmith.com

@vivonk
Copy link
Contributor Author

vivonk commented Dec 14, 2023

/build-deploy-preview skip-tests=true

Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/7208772686.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 29620.
recreate: .

Copy link

Deploy-Preview-URL: https://ce-29620.dp.appsmith.com

@sondermanish
Copy link
Contributor

Added Nit-picks, please take a look. Rest LGTM

@vivonk
Copy link
Contributor Author

vivonk commented Dec 14, 2023

/ok-to-test

@vivonk
Copy link
Contributor Author

vivonk commented Dec 14, 2023

/build-deploy-preview skip-tests=true

Copy link

Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/7211501523.
Workflow: Appsmith External Integration Test Workflow.
Tags: ``.

Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/7211504466.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 29620.
recreate: .

Copy link

Deploy-Preview-URL: https://ce-29620.dp.appsmith.com

Copy link
Contributor

@sondermanish sondermanish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/7211501523.
Commit: ``.
Cypress dashboard url: Click here!
All cypress tests have passed 🎉🎉🎉

@vivonk vivonk merged commit b444196 into release Dec 14, 2023
15 checks passed
@vivonk vivonk deleted the feat/google-ai-plugin branch December 14, 2023 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AI All tasks related to AI Enhancement New feature or request Task A simple Todo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Google AI Gemini Integration
3 participants