Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public class GenerateContentWithTextInput {
Client client = new Client();

GenerateContentResponse response =
client.models.generateContent("gemini-2.5-flash", "What is your name?", null);
client.models.generateContent("gemini-flash-latest", "What is your name?", null);

// Gets the text string from the response by the quick accessor method `text()`.
System.out.println("Unary response: " + response.text());
Expand Down Expand Up @@ -341,7 +341,7 @@ public class GenerateContentWithImageInput {
Part.fromUri("gs://path/to/image.jpg", "image/jpeg"));

GenerateContentResponse response =
client.models.generateContent("gemini-2.5-flash", content, null);
client.models.generateContent("gemini-flash-latest", content, null);

System.out.println("Response: " + response.text());
}
Expand Down Expand Up @@ -402,7 +402,7 @@ public class GenerateContentWithConfigs {
.build();

GenerateContentResponse response =
client.models.generateContent("gemini-2.5-flash", "Tell me the history of LLM", config);
client.models.generateContent("gemini-flash-latest", "Tell me the history of LLM", config);

System.out.println("Response: " + response.text());
}
Expand Down Expand Up @@ -464,7 +464,7 @@ public class GenerateContentWithFunctionCall {

GenerateContentResponse response =
client.models.generateContent(
"gemini-2.5-flash",
"gemini-flash-latest",
"What is the weather in Vancouver?",
config);

Expand Down Expand Up @@ -492,7 +492,7 @@ public class StreamGeneration {

ResponseStream<GenerateContentResponse> responseStream =
client.models.generateContentStream(
"gemini-2.5-flash", "Tell me a story in 300 words.", null);
"gemini-flash-latest", "Tell me a story in 300 words.", null);

System.out.println("Streaming response: ");
for (GenerateContentResponse res : responseStream) {
Expand Down Expand Up @@ -523,7 +523,7 @@ public class GenerateContentAsync {

CompletableFuture<GenerateContentResponse> responseFuture =
client.async.models.generateContent(
"gemini-2.5-flash", "Introduce Google AI Studio.", null);
"gemini-flash-latest", "Introduce Google AI Studio.", null);

responseFuture
.thenAccept(
Expand Down Expand Up @@ -576,7 +576,7 @@ public class GenerateContentWithSchema {
.build();

GenerateContentResponse response =
client.models.generateContent("gemini-2.5-flash", "Tell me your name", config);
client.models.generateContent("gemini-flash-latest", "Tell me your name", config);

System.out.println("Response: " + response.text());
}
Expand All @@ -600,7 +600,7 @@ public class CountTokens {
Client client = new Client();

CountTokensResponse response =
client.models.countTokens("gemini-2.5-flash", "What is your name?", null);
client.models.countTokens("gemini-flash-latest", "What is your name?", null);

System.out.println("Count tokens response: " + response);
}
Expand All @@ -621,7 +621,7 @@ public class ComputeTokens {
Client client = Client.builder().enterprise(true).build();

ComputeTokensResponse response =
client.models.computeTokens("gemini-2.5-flash", "What is your name?", null);
client.models.computeTokens("gemini-flash-latest", "What is your name?", null);

System.out.println("Compute tokens response: " + response);
}
Expand Down Expand Up @@ -996,7 +996,7 @@ public final class FileOperations {
Part.fromText("Summary this pdf."),
Part.fromUri(file.name().get(), file.mimeType().get()));
GenerateContentResponse response =
client.models.generateContent("gemini-2.5-flash", content, null);
client.models.generateContent("gemini-flash-latest", content, null);

// Get the uploaded file.
File retrievedFile = client.files.get(file.name().get(), null);
Expand Down
Loading