mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-27 11:25:13 +01:00
Small fix
This commit is contained in:
@@ -120,6 +120,10 @@ public class Gemini {
|
||||
JSONArray jcandidates = jresponse.optJSONArray("candidates");
|
||||
for (int i = 0; i < jcandidates.length(); i++) {
|
||||
JSONObject jcandidate = jcandidates.getJSONObject(i);
|
||||
|
||||
if (!jcandidate.has("content"))
|
||||
throw new IOException(jresponse.toString(2));
|
||||
|
||||
JSONObject jcontent = jcandidate.getJSONObject("content");
|
||||
|
||||
String role = jcontent.getString("role");
|
||||
|
||||
Reference in New Issue
Block a user