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

[Request] Google Gemini(OpenAI)版本的环境变量 #6867

Open
chung1912 opened this issue Mar 10, 2025 · 4 comments
Open

[Request] Google Gemini(OpenAI)版本的环境变量 #6867

chung1912 opened this issue Mar 10, 2025 · 4 comments
Labels
🌠 Feature Request New feature or request | 特性与建议 Gemini

Comments

@chung1912
Copy link
Contributor

chung1912 commented Mar 10, 2025

🥰 需求描述

如何配置Google Gemini(OpenAI)版本的环境变量?
openai格式版本的请求地址应该是这个样子:https://generativelanguage.googleapis.com/v1beta/openai

🧐 解决方案

增加Google Gemini(OpenAI)版本的环境变量配置
比如设置环境变量GOOGLE_USE_OPEANAI=1,则使用OpenAI的规范格式,默认是0

📝 补充信息

No response

@chung1912 chung1912 added the 🌠 Feature Request New feature or request | 特性与建议 label Mar 10, 2025
@dosubot dosubot bot added the Gemini label Mar 10, 2025
@arvinxx
Copy link
Contributor

arvinxx commented Mar 10, 2025

为啥?

@chung1912
Copy link
Contributor Author

chung1912 commented Mar 10, 2025

为啥?

代理连接几乎都是openai中转,GOOGLE_PROXY_URL填这些中转用不了。不想把谷歌的模型列在openai里面,想显示在谷歌栏目里面
如果兼容了google的openai格式,我就可以直接在GOOGLE_PROXY_URL地方接入openai格式的中转链接

@arvinxx
Copy link
Contributor

arvinxx commented Mar 12, 2025

你可以自己新建一个 Google 的中转 provider 吧?转成 OpenAI 格式是没法保证 Google 自己的一些 tools (例如搜索)可正常调用的,以及返回的 grounding 字段也是丢失的,不会有引用信息,这些我们都是基于 google 的 js sdk 做了专门的适配才实现的。

还包括未来直接传视频、音频的分析,OpenAI 格式的接口也不确定能做到,还有 Google 自己的 embedding 模型的集成配置等。

如果你能接受上述功能的阉割,那么欢迎来提交 PR ,我们应该不会计划做这个特性。

@canisminor1990
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


You can create a new Google transit provider by yourself, right? Converting to OpenAI format cannot guarantee that some of Google's own tools (such as search) can be called normally, and the grounding field returned is also lost, and there will be no reference information. We have implemented these based on Google's js SDK.

It also includes the analysis of direct video transmission and audio transmission in the future, and the interface of OpenAI format is not sure to be able to do it, as well as the integrated configuration of Google's own embedding model.

If you can accept the castration of the above functions, then welcome to submit a PR, we should not plan to do this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌠 Feature Request New feature or request | 特性与建议 Gemini
Projects
None yet
Development

No branches or pull requests

4 participants
@canisminor1990 @arvinxx @chung1912 and others