Skip to content

🚀 feat: Add Gemini 2.0 Support, Update Packages and Deprecations#4951

Merged
danny-avila merged 7 commits into
mainfrom
chores/minor
Dec 11, 2024
Merged

🚀 feat: Add Gemini 2.0 Support, Update Packages and Deprecations#4951
danny-avila merged 7 commits into
mainfrom
chores/minor

Conversation

@danny-avila

@danny-avila danny-avila commented Dec 11, 2024

Copy link
Copy Markdown
Owner

Summary

I added support for the Gemini 2.0 model, updated Express to address a security vulnerability, specified the .env file in the launch configuration, and fixed deprecated MongoDB functions and options.

  • Added Gemini 2.0 support:

    • Updated .env.example to include gemini-2.0-flash-exp in GOOGLE_MODELS.
    • Added 'gemini-2.0' to tokenValues in api/models/tx.js.
    • Added 'gemini-2.0' to googleModels in api/utils/tokens.js.
    • Bumped the version in packages/data-provider/package.json to 0.7.59.
    • Added 'gemini-2.0' to visionModels in packages/data-provider/src/config.ts.
  • Updated Express to version 4.21.2 to address CVE-2024-52798:

  • Specified the .env file in the launch configuration:

    • Added "envFile": "${workspaceFolder}/.env" in .vscode/launch.json.
  • Fixed deprecated MongoDB functions and options:

    • Replaced deprecated count() with countDocuments() in config/user-stats.js.
    • Commented out deprecated MongoDB connection options useNewUrlParser and useUnifiedTopology in api/lib/db/connectDb.js.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Testing

I tested the addition of the Gemini 2.0 model by initiating conversations using the new model and verifying that responses are generated correctly. I ensured that the application runs without warnings or errors due to the updated dependencies and deprecated function replacements. I confirmed that the MongoDB connections work successfully without the deprecated options and that counting functions return correct results. I also verified that the .env file is correctly loaded in the launch configuration.

Test Configuration:

  • Operating System: Ubuntu 22.04 LTS
  • Node.js Version: 18.x
  • MongoDB Version: 6.x

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes

@danny-avila danny-avila changed the title 🚀 feat: Add Gemini 2.0 Support, Update Dependencies, and Fix Deprecations 🚀 feat: Add Gemini 2.0 Support, Update Packages and Deprecations Dec 11, 2024
@danny-avila danny-avila merged commit b5c9144 into main Dec 11, 2024
@danny-avila danny-avila deleted the chores/minor branch December 11, 2024 19:11
Tsounguinzo pushed a commit to Tsounguinzo/LibreChat that referenced this pull request Dec 14, 2024
…ny-avila#4951)

* chore: Comment out deprecated MongoDB connection options in connectDb.js

* replaced deprecrated MongoDB count() function with countDocuments()

* npm audit fix (package-lock cleanup)

* chore: Specify .env file in launch configuration

* feat: gemini-2.0

* chore: bump express to 4.21.2 to address CVE-2024-52798

* chore: remove redundant comment for .env file specification in launch configuration

---------

Co-authored-by: neturmel <neturmel@gmx.de>
MichielMAnalytics pushed a commit to MichielMAnalytics/ProAI that referenced this pull request Jun 6, 2025
…ny-avila#4951)

* chore: Comment out deprecated MongoDB connection options in connectDb.js

* replaced deprecrated MongoDB count() function with countDocuments()

* npm audit fix (package-lock cleanup)

* chore: Specify .env file in launch configuration

* feat: gemini-2.0

* chore: bump express to 4.21.2 to address CVE-2024-52798

* chore: remove redundant comment for .env file specification in launch configuration

---------

Co-authored-by: neturmel <neturmel@gmx.de>
mcbuckeye pushed a commit to mcbuckeye/LibreChat that referenced this pull request Aug 27, 2025
…ny-avila#4951)

* chore: Comment out deprecated MongoDB connection options in connectDb.js

* replaced deprecrated MongoDB count() function with countDocuments()

* npm audit fix (package-lock cleanup)

* chore: Specify .env file in launch configuration

* feat: gemini-2.0

* chore: bump express to 4.21.2 to address CVE-2024-52798

* chore: remove redundant comment for .env file specification in launch configuration

---------

Co-authored-by: neturmel <neturmel@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants