zuisong / gemini-openai-proxy Goto Github PK
View Code? Open in Web Editor NEWOpenAI to Google Gemini https://gemini-openai-proxy.deno.dev
Home Page: https://gemini-openai-proxy.zuisong.workers.dev
License: MIT License
OpenAI to Google Gemini https://gemini-openai-proxy.deno.dev
Home Page: https://gemini-openai-proxy.zuisong.workers.dev
License: MIT License
是否能夠在執行時增加參數切換為 v1beta?
How can i change safety settings on gemini?
I tried to deploy it to CF workers. I set it to stream output. But the result seems to be not streaming, All result output when the request ends on the user end. Anything wrong with my operation
are you going to add embbending end point ?
{
"error": {
"message": "[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-1.0-pro-vision-latest:streamGenerateContent?alt=sse: [400 Bad Request] Multiturn chat is not enabled for models/gemini-1.0-pro-vision-latest"
},
"provider": "google"
}
大佬你好,现在的模型好像是全列出来,都是使用 gemini-pro
而隔壁 https://github.com/zhu327/gemini-openai-proxy 做了模型的映射,感觉这样操作比较清晰,能不能参考,例如:
gpt-3.5-turbo -> gemini-1.0-pro-latest
gpt-4 -> gemini-1.0-ultra-latest
gpt-4-turbo-preview -> gemini-1.5-pro-latest
gpt-4-vision-preview -> gemini-1.0-pro-vision-latest
如果部署在国内的话,最后还是要走代理去访问Gemini的API endpoint?
有没有简单的办法设置代理?
The reponse returned error like below, the base_url is expired?
{"id":"chatcmpl-abc123","object":"chat.completion","created":1721044629,"model":"gpt-4-turbo-preview","choices":[{"message":{"role":"assistant","content":"[GoogleGenerativeAI Error]: Error fetching from google -> error sending request for url (https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro-latest:streamGenerateContent?key=xxxxxxxxxxxxxxxxxxxk&alt=sse): error trying to connect: tcp connect error: Cannot assign requested address (os error 99)"},"finish_reason":"stop","index":0,"logprobs":null}]}
gemini 只在一些语言和地区提供.
我收到限制地区的错误.
Error: [GoogleGenerativeAI Error]:
Error fetching from https://generativelanguage.googleapis.com/v1/models/gemini-pro:streamGenerateContent?alt=sse:
[400 Bad Request] User location is not supported for the API use.
部署在 workers 和 deno 的服务器上应该在 gemini 提供的地区内.
能否像azure-openai-proxy这个项目一样解决限制地区的问题.
谢谢!
没看文档里提到 Gemini Pro Vision 是否支持?
I installed a Deno deployment
https://github.com/zuisong/gemini-openai-proxy/blob/main/dist/main_deno.mjs
put I am receiving an error
{"id":"chatcmpl-abc123","object":"chat.completion","created":1708722674499,"model":"gpt-3.5-turbo","choices":[{"message":{"role":"assistant","content":"[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1/models/gemini-pro:generateContent: [400 Bad Request] User location is not supported for the API use."},"logprobs":null,"finish_reason":"stop","index":0}]}
测试了对最新的0.8和旧版本的0.6镜像都无法拉取,在多台服务器测试均提示 manifest unknown
ghcr.io域名下的其他镜像可正常拉取,这个情况很奇怪,不知道要如何解决
如题。 能详细介绍下怎么在cloudflare上部署这个worker吗?
When i upload an image an ask about it I always get back an error
open-webui | INFO: 172.19.0.1:54044 - "POST /openai/chat/completions HTTP/1.1" 500 Internal Server Error
open-webui | generate_title
open-webui | gpt-4-vision-preview
Uh-oh! There was an issue connecting to Google Gemini-1.0-pro-vision-latest.
text input must be of type `str` (single example), `List[str]` (batch or single pretokenized example) or `List[List[str]]` (batch of pretokenized examples).
But if i use ollama vision models it works just fine
我看项目里有部分function calling的代码,想了解下是也做了这部分处理逻辑吗
实测支持以下客户端(更多客户端欢迎补充):
Check below error message:
Error: [500 Internal Server Error] An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting
at makeRequest (file:///root/gemini-openai-proxy/dist/main_node.mjs:914:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async generateContent (file:///root/gemini-openai-proxy/dist/main_node.mjs:880:20)
at async streamingChatProxyHandler (file:///root/gemini-openai-proxy/dist/main_node.mjs:1020:22)
at async file:///root/gemini-openai-proxy/dist/main_node.mjs:1078:24
at async Object.pull (file:///root/gemini-openai-proxy/dist/main_node.mjs:1091:31)
希望可以转换为 CF worker部署,这样就不需要 docker 了,而且更加方便。
有些应用会缓存成功的 openai 调用结果,如果 gemini 报错以正常消息返回,就会被缓存下来。
can anyone share a working example of the tool or function calls working?? no matter what i do it just gives an empty response when it should call a tool
想添加env获取cloudflare中的全局变量,不知道怎么添加env,还请赐教
你好,这个程序非常方便。不过我发现了一个小问题。Gemini api 有一个safety settings。不知道你有没有处理
我测试的时候,输出总是blockReason': 'SAFETY'。非常蛋疼
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.