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

add gemini-exp-1206, gemini-2.0-flash-thinking-exp-1219 #5959

Merged
merged 2 commits into from
Dec 21, 2024

Conversation

dupl
Copy link
Contributor

@dupl dupl commented Dec 21, 2024

πŸ’» ε˜ζ›΄η±»εž‹ | Change Type

  • feat
  • fix
  • refactor
  • perf
  • style
  • test
  • docs
  • ci
  • chore
  • build

πŸ”€ ε˜ζ›΄θ―΄ζ˜Ž | Description of Change

πŸ“ θ‘₯充俑息 | Additional Information

Summary by CodeRabbit

  • New Features
    • Expanded the list of available Google models.
  • Improvements
    • Updated knowledge cutoff dates for various models for better clarity.
    • Adjusted LaTeX formatting in the system template for improved rendering.

Copy link

vercel bot commented Dec 21, 2024

@dupl is attempting to deploy a commit to the NextChat Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Dec 21, 2024

Walkthrough

The pull request updates the app/constant.ts file with several modifications. It introduces new Google AI models to the googleModels array, including various versions of Gemini models like gemini-1.5-flash and gemini-1.5-pro. The KnowledgeCutOffDate object is expanded with updated knowledge cutoff dates for different AI models. Additionally, a minor change is made to the DEFAULT_SYSTEM_TEMPLATE to adjust LaTeX inline expression formatting.

Changes

File Change Summary
app/constant.ts - Added new Google models to googleModels array (e.g., gemini-1.5-pro, gemini-1.5-flash)
- Updated KnowledgeCutOffDate with new cutoff dates for various models
- Modified DEFAULT_SYSTEM_TEMPLATE LaTeX inline formatting from $x^2$ to \\(x^2\\)

Possibly related PRs

Poem

🐰 Gemini models hop and dance,
Constants update with a swift glance,
LaTeX tweaks with mathematical flair,
Knowledge cutoffs reset with care,
A rabbit's code-leap through the day! πŸš€

Tip

CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. We would love to hear your feedback on Discord.


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 your favorite social media?

❀️ Share
πŸͺ§ Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
app/constant.ts (1)

328-336: Consider reorganizing the Gemini models array for better maintainability.

Consider grouping the models by their status (stable vs. experimental) and adding deprecation comments for experimental models. This would make it easier to maintain the list as models evolve.

 const googleModels = [
   "gemini-1.0-pro", // Deprecated on 2/15/2025
   "gemini-1.5-pro-latest",
   "gemini-1.5-flash-latest",
   "gemini-1.5-flash-8b-latest",
-  "gemini-exp-1114",
-  "gemini-exp-1121",
-  "learnlm-1.5-pro-experimental",
-  "gemini-2.0-flash-exp",
   "gemini-1.5-flash",
   "gemini-1.5-flash-002",
   "gemini-1.5-flash-8b",
-  "gemini-1.5-flash-exp-0827",
   "gemini-1.5-pro",
   "gemini-1.5-pro-002",
-  "gemini-1.5-pro-exp-0827",
-  "gemini-2.0-flash-thinking-exp-1219",
-  "gemini-exp-1206",
+  // Experimental models
+  "gemini-exp-1114",
+  "gemini-exp-1121",
+  "learnlm-1.5-pro-experimental",
+  "gemini-2.0-flash-exp",
+  "gemini-1.5-flash-exp-0827",
+  "gemini-1.5-pro-exp-0827",
+  "gemini-2.0-flash-thinking-exp-1219", // Added in PR #5959
+  "gemini-exp-1206", // Added in PR #5959
 ];
πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between eceec09 and 0a056a7.

πŸ“’ Files selected for processing (1)
  • app/constant.ts (1 hunks)
πŸ”‡ Additional comments (1)
app/constant.ts (1)

328-336: LGTM! New Gemini models added successfully.

The new Gemini models follow the established naming convention and align with the PR objectives.

app/constant.ts Outdated
Comment on lines 328 to 336
"gemini-1.5-flash",
"gemini-1.5-flash-002",
"gemini-1.5-flash-8b",
"gemini-1.5-flash-exp-0827",
"gemini-1.5-pro",
"gemini-1.5-pro-002",
"gemini-1.5-pro-exp-0827",
"gemini-2.0-flash-thinking-exp-1219",
"gemini-exp-1206",
Copy link
Contributor

@coderabbitai coderabbitai bot Dec 21, 2024

Choose a reason for hiding this comment

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

⚠️ Potential issue

Add knowledge cutoff dates for new Gemini models.

The new Gemini models (gemini-exp-1206 and gemini-2.0-flash-thinking-exp-1219) should have their knowledge cutoff dates defined in the KnowledgeCutOffDate object to ensure accurate information is displayed to users.

 export const KnowledgeCutOffDate: Record<string, string> = {
   default: "2021-09",
   "gpt-4-turbo": "2023-12",
   "gpt-4-turbo-2024-04-09": "2023-12",
   "gpt-4-turbo-preview": "2023-12",
   "gpt-4o": "2023-10",
   "gpt-4o-2024-05-13": "2023-10",
   "gpt-4o-2024-08-06": "2023-10",
   "gpt-4o-2024-11-20": "2023-10",
   "chatgpt-4o-latest": "2023-10",
   "gpt-4o-mini": "2023-10",
   "gpt-4o-mini-2024-07-18": "2023-10",
   "gpt-4-vision-preview": "2023-04",
   "o1-mini": "2023-10",
   "o1-preview": "2023-10",
   "gemini-pro": "2023-12",
   "gemini-pro-vision": "2023-12",
+  "gemini-exp-1206": "2023-12",
+  "gemini-2.0-flash-thinking-exp-1219": "2023-12",
 };

Committable suggestion skipped: line range outside the PR's diff.

Copy link
Member

Choose a reason for hiding this comment

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

move 1.5 together

Copy link
Contributor

Choose a reason for hiding this comment

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

@Dogtiti, understood! We can group those β€œ1.5” variants so that all gemini-1.5 entries appear together in the list. Once you confirm the exact desired ordering, we’ll move them in the array accordingly. Let me know if this arrangement works for you or if you have a specific sequence in mind.

Copy link

@daiaji daiaji Dec 21, 2024

Choose a reason for hiding this comment

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

The KnowledgeCutOffDate function really should be updated to include the new Gemini models. It seems like it hasn't been updated in quite a while, and gemini-pro and gemini-pro-vision appear to be deprecated.

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

app/constant.ts Outdated
Comment on lines 328 to 336
"gemini-1.5-flash",
"gemini-1.5-flash-002",
"gemini-1.5-flash-8b",
"gemini-1.5-flash-exp-0827",
"gemini-1.5-pro",
"gemini-1.5-pro-002",
"gemini-1.5-pro-exp-0827",
"gemini-2.0-flash-thinking-exp-1219",
"gemini-exp-1206",
Copy link
Member

Choose a reason for hiding this comment

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

move 1.5 together

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
app/constant.ts (1)

334-336: ⚠️ Potential issue

Add knowledge cutoff dates for new experimental models

The new experimental models "gemini-exp-1206" and "gemini-2.0-flash-thinking-exp-1219" need to have their knowledge cutoff dates defined in the KnowledgeCutOffDate object.

Apply this diff to add the knowledge cutoff dates:

  "gemini-pro": "2023-12",
  "gemini-pro-vision": "2023-12",
+ "gemini-exp-1206": "2023-12",
+ "gemini-2.0-flash-thinking-exp-1219": "2023-12",
🧹 Nitpick comments (2)
app/constant.ts (2)

322-324: Group all gemini-1.5-pro variants together

The gemini-1.5-pro variants should be grouped together with "gemini-1.5-pro-latest" for better organization and readability.

Apply this diff to reorder the models:

  "gemini-1.0-pro", // Deprecated on 2/15/2025
  "gemini-1.5-pro-latest",
+ "gemini-1.5-pro",
+ "gemini-1.5-pro-002",
+ "gemini-1.5-pro-exp-0827",
  "gemini-1.5-flash-latest",
  "gemini-1.5-flash-8b-latest",
- "gemini-1.5-pro",
- "gemini-1.5-pro-002",
- "gemini-1.5-pro-exp-0827",

327-331: Group all gemini-1.5-flash variants together

Similar to the pro variants, the flash variants should be grouped together with their "latest" versions.

Apply this diff to reorder the models:

  "gemini-1.5-flash-latest",
  "gemini-1.5-flash-8b-latest",
+ "gemini-1.5-flash",
+ "gemini-1.5-flash-8b",
+ "gemini-1.5-flash-002",
+ "gemini-1.5-flash-exp-0827",
  "learnlm-1.5-pro-experimental",
- "gemini-1.5-flash",
- "gemini-1.5-flash-8b",
- "gemini-1.5-flash-002",
- "gemini-1.5-flash-exp-0827",
πŸ“œ Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 0a056a7 and 93ac0e5.

πŸ“’ Files selected for processing (1)
  • app/constant.ts (1 hunks)

Comment on lines +334 to +336
"gemini-exp-1206",
"gemini-2.0-flash-exp",
"gemini-2.0-flash-thinking-exp-1219",
Copy link
Contributor

Choose a reason for hiding this comment

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

πŸ’‘ Codebase verification

Based on the search results, I can now generate the final response since we have enough context about the experimental models.

Documentation needed for experimental Gemini models

The experimental models "gemini-exp-1206" and "gemini-2.0-flash-thinking-exp-1219" are part of a series of experimental Gemini models in the codebase, but lack proper documentation about their capabilities and limitations. This could impact developers trying to use these models effectively.

  • Add documentation for the following experimental models:
    • gemini-exp-1206
    • gemini-2.0-flash-thinking-exp-1219
    • Other experimental variants: gemini-exp-1114, gemini-exp-1121, gemini-2.0-flash-exp

The documentation should include:

  • Model capabilities and use cases
  • Any limitations or known issues
  • Expected behavior differences from stable models
  • Whether they support vision/multimodal features (since some Gemini models have vision capabilities)
πŸ”— Analysis chain

Verify the experimental models are properly documented

The experimental models "gemini-exp-1206" and "gemini-2.0-flash-thinking-exp-1219" should have their capabilities and limitations documented.

Let's check if there's any documentation about these models:


Let me check if there are any comments or documentation near these model definitions.


Let me check if there's any documentation in other related files or configuration that might describe these experimental models.


Let me check if there are any comments or documentation in the codebase that might describe these experimental models or their capabilities.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for documentation about the new experimental models
echo "Searching for documentation about new experimental models..."
rg -i "gemini-exp-1206|gemini-2.0-flash-thinking-exp-1219" --type md

# Check if there are any comments or documentation in TypeScript files
echo "Checking for inline documentation..."
rg -i "gemini-exp-1206|gemini-2.0-flash-thinking-exp-1219" --type ts -C 2

Length of output: 605


Script:

#!/bin/bash
# Check for any comments or documentation around these model definitions
echo "Checking for documentation context..."
rg -i "gemini-exp-1206|gemini-2.0-flash-thinking-exp-1219" --type ts -B 10 -A 2

# Check the file header or any surrounding documentation
echo "Checking the constant.ts file structure..."
head -n 50 app/constant.ts

Length of output: 2759


Script:

#!/bin/bash
# Check for any model-related documentation files
echo "Searching for model documentation files..."
fd -e md -e mdx -e txt model

# Check for any configuration or type definitions that might document these models
echo "Checking for model configurations..."
rg -i "model.*type|model.*interface|model.*config" --type ts -C 5

# Check for any comments containing "experimental" or "exp" near model definitions
echo "Checking for experimental model documentation..."
rg -i "experimental.*model|exp.*model" --type ts -C 5

Length of output: 113588


Script:

#!/bin/bash
# Search for any documentation about experimental features or models
echo "Searching for documentation about experimental features..."
rg -i "experimental|exp.*feature" --type md --type txt -C 5

# Check for any configuration or type definitions related to experimental models
echo "Checking for experimental model configurations..."
rg -i "gemini.*exp|experimental.*model" --type ts -C 5

# Check for any changelog or release notes
echo "Checking changelog or release notes..."
fd -e md -e txt -i changelog -i release

Length of output: 6043

@Dogtiti Dogtiti merged commit acc2e97 into ChatGPTNextWeb:main Dec 21, 2024
1 check failed
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.

3 participants