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
Questions about gemini support in the spring ai module #626
Comments
Hey @yangfeng20 could you provide us with a the Gemini documentation that explains how to create and use api keys? |
@yangfeng20 There is a way to work around with the current ProtoMessageRequestFormatter.<GenerateContentRequest>newBuilder()
.setPath("/v1beta/models/{model=*}:generateContent", request -> Map.of("model", "gemini-pro"))
.setQueryParamsExtractor(request -> Map.of("key", List.of("<GEMINI_API_KEY>")))
.setRequestBodyExtractor(request -> ProtoRestSerializer.create().toBody("*", request.toBuilder().clearModel().build(),false))
.build() then set the VertexAI endpoint to |
I want to use the gemini apiKey to access my gemini Ai instead of using project-id+location.
Currently, the spring ai module using gemini only supports project-id+location using google cloud.
The apiKey mode in Google ai studio is not supported.
My request was to support the apiKey pattern, similar to openai.
The text was updated successfully, but these errors were encountered: