@@ -78,8 +78,6 @@ public class VertexAiGeminiChatClient
|
||||
|
||||
private final GenerationConfig generationConfig;
|
||||
|
||||
private GenerativeModel generativeModel;
|
||||
|
||||
public enum GeminiMessageType {
|
||||
|
||||
USER("user"),
|
||||
@@ -140,7 +138,6 @@ public class VertexAiGeminiChatClient
|
||||
this.vertexAI = vertexAI;
|
||||
this.defaultOptions = options;
|
||||
this.generationConfig = toGenerationConfig(options);
|
||||
this.generativeModel = new GenerativeModel(options.getModel(), vertexAI);
|
||||
}
|
||||
|
||||
// https://cloud.google.com/vertex-ai/docs/generative-ai/model-reference/gemini
|
||||
@@ -204,7 +201,8 @@ public class VertexAiGeminiChatClient
|
||||
Set<String> functionsForThisRequest = new HashSet<>();
|
||||
|
||||
GenerationConfig generationConfig = this.generationConfig;
|
||||
GenerativeModel generativeModel = this.generativeModel;
|
||||
|
||||
GenerativeModel generativeModel = new GenerativeModel(this.defaultOptions.getModel(), this.vertexAI);
|
||||
|
||||
VertexAiGeminiChatOptions updatedRuntimeOptions = null;
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ public class VertexAiGeminiChatClientFunctionCallingIT {
|
||||
public void functionCallTestInferredOpenApiSchemaStream() {
|
||||
|
||||
UserMessage userMessage = new UserMessage(
|
||||
"What's the weather like in San Francisco, in Paris and in Tokyo? Use Multi-turn function calling.");
|
||||
"What's the weather like in San Francisco, in Paris and in Tokyo, Japan? Use Multi-turn function calling. Provide answer for all requested locations.");
|
||||
|
||||
List<Message> messages = new ArrayList<>(List.of(userMessage));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user