@Before
  public void setUp() throws IOException {
    vertexAi = new VertexAI(PROJECT_ID, LOCATION);
    // Set temperature to 0 to reduce randomness on model responses
    GenerationConfig defaultGenerationConfig =
        GenerationConfig.newBuilder().setTemperature(0).build();
    model =
        new GenerativeModel(MODEL_NAME_TEXT, vertexAi)
            .withGenerationConfig(defaultGenerationConfig);
  }
Callable function getCurrentWeather for testing automatic function calling.
java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/it/ITChatSessionIntegrationTest.java