diff --git a/vertexai/snippets/src/main/java/vertexai/gemini/StreamingQuestionAnswer.java b/vertexai/snippets/src/main/java/vertexai/gemini/StreamingQuestionAnswer.java index c5d69ea92d7..dd6347fd520 100644 --- a/vertexai/snippets/src/main/java/vertexai/gemini/StreamingQuestionAnswer.java +++ b/vertexai/snippets/src/main/java/vertexai/gemini/StreamingQuestionAnswer.java @@ -40,7 +40,7 @@ public static void streamingQuestion(String projectId, String location, String m GenerativeModel model = new GenerativeModel(modelName, vertexAI); // Stream the result. - model.generateContentStream("Why is the sky blue?") + model.generateContentStream("Write a story about a magic backpack.") .stream() .forEach(System.out::println); diff --git a/vertexai/snippets/src/test/java/vertexai/gemini/SnippetsIT.java b/vertexai/snippets/src/test/java/vertexai/gemini/SnippetsIT.java index 6a3abc39e44..5023db0d0e5 100644 --- a/vertexai/snippets/src/test/java/vertexai/gemini/SnippetsIT.java +++ b/vertexai/snippets/src/test/java/vertexai/gemini/SnippetsIT.java @@ -190,7 +190,7 @@ public void testSingleTurnMultimodal() throws IOException { @Test public void testStreamingQuestions() throws Exception { StreamingQuestionAnswer.streamingQuestion(PROJECT_ID, LOCATION, GEMINI_FLASH); - assertThat(bout.toString()).contains("Rayleigh scattering"); + assertThat(bout.toString()).isNotEmpty(); } @Test