-
Notifications
You must be signed in to change notification settings - Fork 692
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
Gemini embeddings apparently not sending the api key #1478
Comments
I'm facing the same thing with the latest release 0.19.0. I added some log lines to the code:
Added an api_key_name to the embedding section of the config.google_ai_studio.yaml:
It makes to the LitellmEmbedderProvider in wren-ai-service just fine. But litellm doesn't seem to use it just like @josefresna mentioned above.
I followed @josefresna's excellent idea for the workaround and it worked. |
Thanks for raising the issue, and I will look into this issue this weekend |
Great! Thank you very much |
@josefresna @agupta7 we've fixed the issue. please use WREN_AI_SERVICE_VERSION=0.19.2 in ~/.wrenai/.env and use this config.google_ai_studio.yaml as example |
It works now, thanks! I was looking at how you fixed it in #1524 and I'm a little confused. How did making api_base optional in LitellmEmbedderProvider fix it? Does Litellm know its own default api_base URLs for a given model (gemini in my case)? |
@agupta7 yes, I think so. the code should be here: https://github.com/BerriAI/litellm/blob/ff3a6830a441d232eaada541018d9d42b5d28783/litellm/llms/vertex_ai/common_utils.py#L115 |
I'll close issue now |
First, thank you very much for this amazing tool
Describe the bug
I would like to use Gemini embeddings.
In order to do that I have specified the following configuration:
Also in the .env I have specified:
This configuration was working in WrenAI 0.16.0. More specific, with wren-ai-service 0.16.5
But not in 0.17.0 or 0.18.0
As far as I get to know, the wren-ai-service is not sending the api key to gemini:
This is the error I am getting:
This is the request that seems to fail:
This should be the reques (with the api key as query string)t:
So, it is a matter of sending the api key, apparently
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I was expecting to work as it did in the previous versions
Screenshots
Desktop (please complete the following information):
Wren AI Information
Additional context
Everything seems to work fine if I specified version 0.16.5 of wren-ai-service
Relevant log output
Config.yaml
wrenai-ibis-server.log
wrenai-wren-ai-service.log
wrenai-wren-engine.log
wrenai-wren-ui.log
Thanks!
My Workaround:
This workaround suggests that the configuration that I had specified was ok (gemini urls, api key...).
So it is a matter of sending the api key when WrenAI ask for the embeddings
Thanks!
The text was updated successfully, but these errors were encountered: