jrmccluskey commented on code in PR #37471:
URL: https://github.com/apache/beam/pull/37471#discussion_r2760697623


##########
sdks/java/ml/inference/openai/src/test/java/org/apache/beam/sdk/ml/inference/openai/OpenAIModelHandlerIT.java:
##########
@@ -252,33 +292,40 @@ public void testWithDifferentModel() {
     // Test with a different model
     String input = "Explain quantum computing in one sentence.";
 
-    PCollection<OpenAIModelInput> inputs = pipeline
-      .apply("CreateInput", Create.of(input))
-      .apply("MapToInput", MapElements
-        .into(TypeDescriptor.of(OpenAIModelInput.class))
-        .via(OpenAIModelInput::create));
-
-    PCollection<Iterable<PredictionResult<OpenAIModelInput, 
OpenAIModelResponse>>> results = inputs
-      .apply("DifferentModelInference",
-        RemoteInference.<OpenAIModelInput, OpenAIModelResponse>invoke()
-          .handler(OpenAIModelHandler.class)
-          .withParameters(OpenAIModelParameters.builder()
-            .apiKey(apiKey)
-            .modelName("gpt-5")
-            .instructionPrompt("Respond concisely")
-            .build()));
-
-    PAssert.that(results).satisfies(batches -> {
-      for (Iterable<PredictionResult<OpenAIModelInput, OpenAIModelResponse>> 
batch : batches) {
-        for (PredictionResult<OpenAIModelInput, OpenAIModelResponse> result : 
batch) {
-          assertNotNull("Output should not be null",
-            result.getOutput().getModelResponse());
-          assertFalse("Output should not be empty",
-            result.getOutput().getModelResponse().trim().isEmpty());
-        }
-      }
-      return null;
-    });
+    PCollection<OpenAIModelInput> inputs =
+        pipeline
+            .apply("CreateInput", Create.of(input))
+            .apply(
+                "MapToInput",
+                MapElements.into(TypeDescriptor.of(OpenAIModelInput.class))
+                    .via(OpenAIModelInput::create));
+
+    PCollection<Iterable<PredictionResult<OpenAIModelInput, 
OpenAIModelResponse>>> results =
+        inputs.apply(
+            "DifferentModelInference",
+            RemoteInference.<OpenAIModelInput, OpenAIModelResponse>invoke()
+                .handler(OpenAIModelHandler.class)
+                .withParameters(
+                    OpenAIModelParameters.builder()
+                        .apiKey(apiKey)
+                        .modelName("gpt-5")

Review Comment:
   Good to know Gemini is behind the times, this is ignorable



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to