Skip to content

Commit ba664de

Browse files
authored
refactor(vertexai): decommission ControlledGenerationSchema6.java VertexAI sample file (#10301)
* refactor: remove deprecated controlled generation schema sample file * test: remove unused testControlledGenerationWithJsonSchema6 method from SnippetsIT
1 parent 916a87f commit ba664de

2 files changed

Lines changed: 0 additions & 104 deletions

File tree

vertexai/snippets/src/main/java/vertexai/gemini/ControlledGenerationSchema6.java

Lines changed: 0 additions & 82 deletions
This file was deleted.

vertexai/snippets/src/test/java/vertexai/gemini/SnippetsIT.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -196,26 +196,4 @@ public void testMultimodalNonStreaming() throws Exception {
196196

197197
assertThat(output).ignoringCase().contains("no");
198198
}
199-
200-
private class Obj {
201-
public String object;
202-
}
203-
204-
@Test
205-
public void testControlledGenerationWithJsonSchema6() throws Exception {
206-
String output = ControlledGenerationSchema6
207-
.controlGenerationWithJsonSchema6(PROJECT_ID, LOCATION, GEMINI_FLASH);
208-
209-
Obj[] objects = new Gson().fromJson(output, Obj[].class);
210-
String recognizedObjects = Arrays.stream(objects)
211-
.map(obj -> obj.object.toLowerCase())
212-
.collect(Collectors.joining(" "));
213-
214-
assertThat(recognizedObjects).isNotEmpty();
215-
assertThat(recognizedObjects).contains("globe");
216-
assertThat(recognizedObjects).contains("keyboard");
217-
assertThat(recognizedObjects).contains("passport");
218-
assertThat(recognizedObjects).contains("pot");
219-
}
220-
221199
}

0 commit comments

Comments
 (0)