Gemini openai Network Problem #8302
Replies: 10 comments 5 replies
|
Same issue as well. |
|
Same issue. |
|
Same here |
|
google provides a method to compatibility with openai, like https://generativelanguage.googleapis.com/v1beta/openai from openai import OpenAI
client = OpenAI(
api_key="OPENAI_API_KEY",
base_url="https://api.openai.com/v1"
# real use https://api.openai.com/v1/chat/completions
)
client = OpenAI(
api_key="GEMINI_API_KEY",
base_url="https://generativelanguage.googleapis.com/v1beta/openai"
# real use https://generativelanguage.googleapis.com/v1beta/openai/chat/completions
)you can see the different, there is impossible for "v1" in the url like : https://generativelanguage.googleapis.com/v1beta/openai/v1/chat/completions |
|
The problem comes from Google's compression of the answer. Data is received by the backend, which sends it back uncompressed to the frontend. But the backend sends the same header back to the frontend with r.headers['Content-Encoding']. You need to del r.headers['Content-Encoding']. |
|
Yes since 0.5.11 with direct_chat_completion it's ok, without code modification :-) |
|
I am still stuck, cannot add gemini |
|
Hi everyone, Following the discussion here about connecting Gemini models to Open WebUI and the network/connection issues, I wanted to share something I'm working on. Myself and some collaborators are developing an Open WebUI pipe (gemini_manifold.py) specifically designed to work with Gemini models and leverage more of its unique features beyond just the basic OpenAI compatibility layer. It's hosted on my GitHub within the Feel free to check it out! |



Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Bug Report
Using the new Gemini openai compatible api url:
in settings OpenAI API connections
https://generativelanguage.googleapis.com/v1beta
Get--> Network Problem
using v0.5.3
anyone have a solution ?
works ok with curl , python requests ..
All reactions