|
18 | 18 |
|
19 | 19 | import android.graphics.Bitmap; |
20 | 20 | import com.google.common.util.concurrent.ListenableFuture; |
21 | | -import com.google.firebase.concurrent.FirebaseExecutors; |
22 | 21 | import com.google.firebase.ai.FirebaseAI; |
23 | 22 | import com.google.firebase.ai.GenerativeModel; |
24 | 23 | import com.google.firebase.ai.LiveGenerativeModel; |
|
56 | 55 | import com.google.firebase.ai.type.TextPart; |
57 | 56 | import com.google.firebase.ai.type.UsageMetadata; |
58 | 57 | import com.google.firebase.ai.type.Voices; |
| 58 | +import com.google.firebase.concurrent.FirebaseExecutors; |
59 | 59 | import java.util.Calendar; |
60 | 60 | import java.util.List; |
61 | 61 | import java.util.Map; |
@@ -172,7 +172,7 @@ public void validateGenerateContentResponse(GenerateContentResponse response) { |
172 | 172 | List<Candidate> candidates = response.getCandidates(); |
173 | 173 | if (candidates.size() == 1 |
174 | 174 | && candidates.get(0).getContent().getParts().stream() |
175 | | - .anyMatch(p -> p instanceof TextPart && !((TextPart) p).getText().isEmpty())) { |
| 175 | + .anyMatch(p -> p instanceof TextPart && !((TextPart) p).getText().isEmpty())) { |
176 | 176 | String text = response.getText(); |
177 | 177 | Assert.assertNotNull(text); |
178 | 178 | Assert.assertFalse(text.isBlank()); |
@@ -316,10 +316,10 @@ public void onComplete() { |
316 | 316 | } |
317 | 317 |
|
318 | 318 | private void validateLiveContentResponse(LiveContentResponse response) { |
319 | | - //int status = response.getStatus(); |
320 | | - //Assert.assertEquals(status, LiveContentResponse.Status.Companion.getNORMAL()); |
321 | | - //Assert.assertNotEquals(status, LiveContentResponse.Status.Companion.getINTERRUPTED()); |
322 | | - //Assert.assertNotEquals(status, LiveContentResponse.Status.Companion.getTURN_COMPLETE()); |
| 319 | + // int status = response.getStatus(); |
| 320 | + // Assert.assertEquals(status, LiveContentResponse.Status.Companion.getNORMAL()); |
| 321 | + // Assert.assertNotEquals(status, LiveContentResponse.Status.Companion.getINTERRUPTED()); |
| 322 | + // Assert.assertNotEquals(status, LiveContentResponse.Status.Companion.getTURN_COMPLETE()); |
323 | 323 | // TODO b/412743328 LiveContentResponse.Status inaccessible for Java users |
324 | 324 | Content data = response.getData(); |
325 | 325 | if (data != null) { |
|
0 commit comments