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

Update Gemini generativelanguage api version to v1alpha for support of latest reasoning model #5561

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

youngzyl
Copy link

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

The latest Gemini reasoning model gemini-2.0-flash-thinking-exp-01-21 require a newer API version "v1apha" for content generation.

📝 补充信息 | Additional Information

Copy link

vercel bot commented Jan 23, 2025

@youngzyl is attempting to deploy a commit to the LobeHub Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jan 23, 2025
@lobehubbot
Copy link
Member

👍 @youngzyl

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@arvinxx
Copy link
Contributor

arvinxx commented Jan 23, 2025

is there any document for this?

@youngzyl
Copy link
Author

is there any document for this?

Originally, I saw it on Gemini docs below. Since all the use case of the new reasoning model was specific the v1alpha, I thought it's necessary.

https://ai.google.dev/gemini-api/docs/thinking#send-basic

To use the new thought parameter, you need to use the v1alpha version of the Gemini API.

but seems like "gemini-2.0-flash-thinking-exp-01-21" is also available in v1beta. I think it's probably an feature update between v1beta and v1alpha, instead of a cut off.

I think it shouldn't be marked as a bug fix. And having discussion of the API version implement.

@sxjeru
Copy link
Contributor

sxjeru commented Jan 23, 2025

It might be best to postpone the change until LobeChat officially supports reasoning/thinking models.

@arvinxx
Copy link
Contributor

arvinxx commented Jan 23, 2025

I have tried with google sdk, it doesn't support CoT by now: google-gemini/generative-ai-js#328. So need to wait for their update.

Copy link

gru-agent bot commented Jan 23, 2025

This pull request has been modified. If you want me to regenerate unit test for any of the files related, please find the file in "Files Changed" tab and add a comment @gru-agent. (The github "Comment on this file" feature is in the upper right corner of each file in "Files Changed" tab.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants