-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[GH-3723] Vertex AI Gemini logprobs support #3724
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Rodrigo Malara <[email protected]>
Closes spring-projectsGH-3723 Signed-off-by: Rodrigo Malara <[email protected]>
@@ -49,6 +49,7 @@ | |||
import io.micrometer.observation.contextpropagation.ObservationThreadLocalAccessor; | |||
import org.slf4j.Logger; | |||
import org.slf4j.LoggerFactory; | |||
import org.springframework.ai.vertexai.gemini.api.VertexAiGeminiApi; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this line between lines 87 and 88.
...
import org.springframework.ai.tool.definition.ToolDefinition;
import org.springframework.ai.vertexai.gemini.api.VertexAiGeminiApi;
import org.springframework.ai.vertexai.gemini.common.VertexAiGeminiConstants;
...
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(this.stopSequences, this.temperature, this.topP, this.topK, this.candidateCount, | ||
this.frequencyPenalty, this.presencePenalty, this.maxOutputTokens, this.model, this.responseMimeType, | ||
this.toolCallbacks, this.toolNames, this.googleSearchRetrieval, this.safetySettings, | ||
this.internalToolExecutionEnabled, this.toolContext); | ||
this.internalToolExecutionEnabled, this.toolContext, this.toolContext, this.logprobs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please confirm whether the use of this.toolContext
twice is intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! It's not - just removed the extra one.
@@ -0,0 +1,16 @@ | |||
package org.springframework.ai.vertexai.gemini.api; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a license header.
Closes spring-projectsGH-3723 Signed-off-by: Rodrigo Malara <[email protected]>
@rodrigomalara Thanks for the PR! |
No description provided.