diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ContentMaker.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ContentMaker.java
index 33e55e0fca47..e9338b91eb50 100644
--- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ContentMaker.java
+++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ContentMaker.java
@@ -24,7 +24,7 @@ public class ContentMaker {
private static String role = "user";
/**
- * Create a ContentMakerForRole for a given role.
+ * Creates a ContentMakerForRole for a given role.
*
* @param role Currently accepted role values are: "user", "model". No need to call forRole for
* the "user" role since it's the default role.
@@ -53,7 +53,7 @@ private static Content fromMultiModalDataWithRole(String role, Object... multiMo
}
/**
- * Create a content from a string, assuming the role is "user".
+ * Creates a content from a string, assuming the role is "user".
*
*
The resulting content will contain one single {@link com.google.cloud.vertexai.api.Part}
* with its text field set.
@@ -65,7 +65,7 @@ public static Content fromString(String text) {
}
/**
- * Create a content from an array of Objects, assuming the role is "user".
+ * Creates a content from an array of Objects, assuming the role is "user".
*
*
The resulting content can contain multiple {@link com.google.cloud.vertexai.api.Part}s. Each
* element in the array becomes one part.
@@ -91,7 +91,7 @@ private ContentMakerForRole(String role) {
}
/**
- * Create a content from a string.
+ * Creates a content from a string.
*
* @param text a string which will be converted to a {@link com.google.cloud.vertexai.api.Part}
* with its text field set.
@@ -101,7 +101,7 @@ public Content fromString(String text) {
}
/**
- * Create a content from an array of Objects.
+ * Creates a content from an array of Objects.
*
* @param multiModalData an array which contains the actual payload of each part. The element
* could be either a single String or a Part. When it's a single string, it's converted to a
diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/GenerateContentConfig.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/GenerateContentConfig.java
index 4c3a41ec3cb0..05ebcfdb72da 100644
--- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/GenerateContentConfig.java
+++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/GenerateContentConfig.java
@@ -66,7 +66,7 @@ public GenerateContentConfig build() {
}
/**
- * Set {@link com.google.cloud.vertexai.api.GenerationConfig} that will be used in the generate
+ * Sets {@link com.google.cloud.vertexai.api.GenerationConfig} that will be used in the generate
* content API call.
*
* @return builder for the GenerateContentConfig
@@ -78,7 +78,7 @@ public Builder setGenerationConfig(GenerationConfig generationConfig) {
}
/**
- * Set a list of {@link com.google.cloud.vertexai.api.SafetySetting} that will be used in the
+ * Sets a list of {@link com.google.cloud.vertexai.api.SafetySetting} that will be used in the
* generate content API call.
*
* @return builder for the GenerateContentConfig
@@ -90,7 +90,7 @@ public Builder setSafetySettings(List safetySettings) {
}
/**
- * Set a list of {@link com.google.cloud.vertexai.api.Tool} that will be used in the generate
+ * Sets a list of {@link com.google.cloud.vertexai.api.Tool} that will be used in the generate
* content API call.
*
* @return builder for the GenerateContentConfig
diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/GenerativeModel.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/GenerativeModel.java
index cdb3311bb35d..c488ef24ba7b 100644
--- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/GenerativeModel.java
+++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/GenerativeModel.java
@@ -99,7 +99,7 @@ public GenerativeModel build() {
}
/**
- * Set the name of the generative model. This is required for building a GenerativeModel
+ * Sets the name of the generative model. This is required for building a GenerativeModel
* instance. Supported format: "gemini-pro", "models/gemini-pro",
* "publishers/google/models/gemini-pro", where "gemini-pro" is the model name. Valid model
* names can be found at
@@ -111,7 +111,7 @@ public Builder setModelName(String modelName) {
}
/**
- * Set {@link com.google.cloud.vertexai.VertexAI} that contains the default configs for the
+ * Sets {@link com.google.cloud.vertexai.VertexAI} that contains the default configs for the
* generative model. This is required for building a GenerativeModel instance.
*/
public Builder setVertexAi(VertexAI vertexAi) {
@@ -120,7 +120,7 @@ public Builder setVertexAi(VertexAI vertexAi) {
}
/**
- * Set {@link com.google.cloud.vertexai.api.GenerationConfig} that will be used by default to
+ * Sets {@link com.google.cloud.vertexai.api.GenerationConfig} that will be used by default to
* interact with the generative model.
*/
@BetaApi
@@ -130,7 +130,7 @@ public Builder setGenerationConfig(GenerationConfig generationConfig) {
}
/**
- * Set a list of {@link com.google.cloud.vertexai.api.SafetySetting} that will be used by
+ * Sets a list of {@link com.google.cloud.vertexai.api.SafetySetting} that will be used by
* default to interact with the generative model.
*/
@BetaApi
@@ -145,7 +145,7 @@ public Builder setSafetySettings(List safetySettings) {
}
/**
- * Set a list of {@link com.google.cloud.vertexai.api.Tool} that will be used by default to
+ * Sets a list of {@link com.google.cloud.vertexai.api.Tool} that will be used by default to
* interact with the generative model.
*/
@BetaApi
@@ -160,7 +160,7 @@ public Builder setTools(List tools) {
}
/**
- * Set the {@link Transport} layer for API calls in the generative model. It overrides the
+ * Sets the {@link Transport} layer for API calls in the generative model. It overrides the
* transport setting in {@link com.google.cloud.vertexai.VertexAI}
*/
public Builder setTransport(Transport transport) {
@@ -170,7 +170,7 @@ public Builder setTransport(Transport transport) {
}
/**
- * Construct a GenerativeModel instance.
+ * Constructs a GenerativeModel instance.
*
* @param modelName the name of the generative model. Supported format: "gemini-pro",
* "models/gemini-pro", "publishers/google/models/gemini-pro", where "gemini-pro" is the model
@@ -184,7 +184,7 @@ public GenerativeModel(String modelName, VertexAI vertexAi) {
}
/**
- * Construct a GenerativeModel instance.
+ * Constructs a GenerativeModel instance.
*
* @param modelName the name of the generative model. Supported format: "gemini-pro",
* "models/gemini-pro", "publishers/google/models/gemini-pro"
@@ -198,7 +198,7 @@ public GenerativeModel(String modelName, VertexAI vertexAi, Transport transport)
}
/**
- * Construct a GenerativeModel instance with default generation config.
+ * Constructs a GenerativeModel instance with default generation config.
*
* @param modelName the name of the generative model. Supported format: "gemini-pro",
* "models/gemini-pro", "publishers/google/models/gemini-pro"
@@ -213,7 +213,7 @@ public GenerativeModel(String modelName, GenerationConfig generationConfig, Vert
}
/**
- * Construct a GenerativeModel instance with default generation config.
+ * Constructs a GenerativeModel instance with default generation config.
*
* @param modelName the name of the generative model. Supported format: "gemini-pro",
* "models/gemini-pro", "publishers/google/models/gemini-pro"
@@ -231,7 +231,7 @@ public GenerativeModel(
}
/**
- * Construct a GenerativeModel instance with default safety settings.
+ * Constructs a GenerativeModel instance with default safety settings.
*
* @param modelName the name of the generative model. Supported format: "gemini-pro",
* "models/gemini-pro", "publishers/google/models/gemini-pro"
@@ -246,7 +246,7 @@ public GenerativeModel(String modelName, List safetySettings, Ver
}
/**
- * Construct a GenerativeModel instance with default safety settings.
+ * Constructs a GenerativeModel instance with default safety settings.
*
* @param modelName the name of the generative model. Supported format: "gemini-pro",
* "models/gemini-pro", "publishers/google/models/gemini-pro"
@@ -267,7 +267,7 @@ public GenerativeModel(
}
/**
- * Construct a GenerativeModel instance with default generation config and safety settings.
+ * Constructs a GenerativeModel instance with default generation config and safety settings.
*
* @param modelName the name of the generative model. Supported format: "gemini-pro",
* "models/gemini-pro", "publishers/google/models/gemini-pro"
@@ -288,7 +288,7 @@ public GenerativeModel(
}
/**
- * Construct a GenerativeModel instance with default generation config and safety settings.
+ * Constructs a GenerativeModel instance with default generation config and safety settings.
*
* @param modelName the name of the generative model. Supported format: "gemini-pro",
* "models/gemini-pro", "publishers/google/models/gemini-pro"
@@ -332,7 +332,7 @@ public GenerativeModel(
}
/**
- * Count tokens in a text message.
+ * Counts tokens in a text message.
*
* @param text a text message to count tokens
* @return a {@link com.google.cloud.vertexai.api.CountTokensResponse} instance that contains the
@@ -345,7 +345,7 @@ public CountTokensResponse countTokens(String text) throws IOException {
}
/**
- * Count tokens in a single content.
+ * Counts tokens in a single content.
*
* @param content a {@link com.google.cloud.vertexai.api.Content} to count tokens
* @return a {@link com.google.cloud.vertexai.api.CountTokensResponse} instance that contains the
@@ -358,7 +358,7 @@ public CountTokensResponse countTokens(Content content) throws IOException {
}
/**
- * Count tokens in a list of contents.
+ * Counts tokens in a list of contents.
*
* @param contents a list of {@link com.google.cloud.vertexai.api.Content} to count tokens
* @return a {@link com.google.cloud.vertexai.api.CountTokensResponse} instance that contains the
@@ -377,7 +377,7 @@ public CountTokensResponse countTokens(List contents) throws IOExceptio
}
/**
- * Send CountTokensRequest given a request message.
+ * Sends CountTokensRequest given a request message.
*
* @param request a {@link com.google.cloud.vertexai.api.CountTokensRequest} that contains a list
* of contents
@@ -396,7 +396,7 @@ private CountTokensResponse countTokensFromRequest(CountTokensRequest request)
}
/**
- * Generate content from generative model given a text.
+ * Generates content from generative model given a text.
*
* @param text a text message to send to the generative model
* @return a {@link com.google.cloud.vertexai.api.GenerateContentResponse} instance that contains
@@ -425,7 +425,7 @@ public GenerateContentResponse generateContent(String text, GenerateContentConfi
}
/**
- * Generate content from generative model given a text and generation config.
+ * Generates content from generative model given a text and generation config.
*
* @param text a text message to send to the generative model
* @param generationConfig a {@link com.google.cloud.vertexai.api.GenerationConfig} instance for
@@ -443,7 +443,7 @@ public GenerateContentResponse generateContent(String text, GenerationConfig gen
}
/**
- * Generate content from generative model given a text and safety settings.
+ * Generates content from generative model given a text and safety settings.
*
* @param text a text message to send to the generative model
* @param safetySettings a list of {@link com.google.cloud.vertexai.api.SafetySetting} for
@@ -461,7 +461,7 @@ public GenerateContentResponse generateContent(String text, List
}
/**
- * Generate content from generative model given a text, generation config, and safety settings.
+ * Generates content from generative model given a text, generation config, and safety settings.
*
* @param text a text message to send to the generative model
* @param generationConfig a {@link com.google.cloud.vertexai.api.GenerationConfig} instance for
@@ -485,7 +485,7 @@ public GenerateContentResponse generateContent(
}
/**
- * Generate content from this model given a list of contents.
+ * Generates content from this model given a list of contents.
*
* @param contents a list of {@link com.google.cloud.vertexai.api.Content} to send to the
* generative model
@@ -499,7 +499,7 @@ public GenerateContentResponse generateContent(List contents) throws IO
}
/**
- * Generate content from this model given a list of contents and generation config.
+ * Generates content from this model given a list of contents and generation config.
*
* @param contents a list of {@link com.google.cloud.vertexai.api.Content} to send to the
* generative model
@@ -518,7 +518,7 @@ public GenerateContentResponse generateContent(
}
/**
- * Generate content from this model given a list of contents and safety settings.
+ * Generates content from this model given a list of contents and safety settings.
*
* @param contents a list of {@link com.google.cloud.vertexai.api.Content} to send to the
* generative model
@@ -572,7 +572,7 @@ public GenerateContentResponse generateContent(
}
/**
- * Generate content from generative model given a list of contents, generation config, and safety
+ * Generates content from generative model given a list of contents, generation config, and safety
* settings.
*
* @param contents a list of {@link com.google.cloud.vertexai.api.Content} to send to the
@@ -627,7 +627,7 @@ private GenerateContentResponse generateContent(GenerateContentRequest request)
}
/**
- * Generate content from this model given a single content.
+ * Generates content from this model given a single content.
*
* @param content a {@link com.google.cloud.vertexai.api.Content} to send to the generative model
* @return a {@link com.google.cloud.vertexai.api.GenerateContentResponse} instance that contains
@@ -656,7 +656,7 @@ public GenerateContentResponse generateContent(Content content, GenerateContentC
}
/**
- * Generate content from this model given a single content and generation config.
+ * Generates content from this model given a single content and generation config.
*
* @param content a {@link com.google.cloud.vertexai.api.Content} to send to the generative model
* @param generationConfig a {@link com.google.cloud.vertexai.api.GenerationConfig} instance for
@@ -674,7 +674,7 @@ public GenerateContentResponse generateContent(Content content, GenerationConfig
}
/**
- * Generate content from this model given a single content and safety settings.
+ * Generates content from this model given a single content and safety settings.
*
* @param content a {@link com.google.cloud.vertexai.api.Content} to send to the generative model
* @param safetySettings a list of {@link com.google.cloud.vertexai.api.SafetySetting} for
@@ -692,7 +692,7 @@ public GenerateContentResponse generateContent(
}
/**
- * Generate content from generative model given a single content, generation config, and safety
+ * Generates content from generative model given a single content, generation config, and safety
* settings.
*
* @param content a {@link com.google.cloud.vertexai.api.Content} to send to the generative model
@@ -714,7 +714,7 @@ public GenerateContentResponse generateContent(
}
/**
- * Generate content with streaming support from generative model given a text.
+ * Generates content with streaming support from generative model given a text.
*
* @param text a text message to send to the generative model
* @return a {@link ResponseStream} that contains a streaming of {@link
@@ -727,7 +727,7 @@ public ResponseStream generateContentStream(String text
}
/**
- * Generate content with streaming support from generative model given a text and configs.
+ * Generates content with streaming support from generative model given a text and configs.
*
* @param text a text message to send to the generative model
* @param config a {@link GenerateContentConfig} that contains all the configs in making a
@@ -742,7 +742,7 @@ public ResponseStream generateContentStream(
}
/**
- * Generate content with streaming support from generative model given a text and generation
+ * Generates content with streaming support from generative model given a text and generation
* config.
*
* @param text a text message to send to the generative model
@@ -761,7 +761,8 @@ public ResponseStream generateContentStream(
}
/**
- * Generate content with streaming support from generative model given a text and safety settings.
+ * Generates content with streaming support from generative model given a text and safety
+ * settings.
*
* @param text a text message to send to the generative model
* @param safetySettings a list of {@link com.google.cloud.vertexai.api.SafetySetting} for
@@ -779,7 +780,7 @@ public ResponseStream generateContentStream(
}
/**
- * Generate content with streaming support from generative model given a text, generation config,
+ * Generates content with streaming support from generative model given a text, generation config,
* and safety settings.
*
* @param text a text message to send to the generative model
@@ -804,7 +805,7 @@ public ResponseStream generateContentStream(
}
/**
- * Generate content with streaming support from generative model given a single Content.
+ * Generates content with streaming support from generative model given a single Content.
*
* @param content a {@link com.google.cloud.vertexai.api.Content} to send to the generative model.
* The role of the content is "user".
@@ -818,7 +819,7 @@ public ResponseStream generateContentStream(Content con
}
/**
- * Generate content with streaming support from generative model given a single content and
+ * Generates content with streaming support from generative model given a single content and
* configs.
*
* @param content a {@link com.google.cloud.vertexai.api.Content} to send to the generative model
@@ -834,7 +835,7 @@ public ResponseStream generateContentStream(
}
/**
- * Generate content with streaming support from generative model given a single Content and
+ * Generates content with streaming support from generative model given a single Content and
* generation config.
*
* @param content a {@link com.google.cloud.vertexai.api.Content} to send to the generative model
@@ -853,8 +854,8 @@ public ResponseStream generateContentStream(
}
/**
- * Generate content with streaming support from generative model given a single content and safety
- * settings.
+ * Generates content with streaming support from generative model given a single content and
+ * safety settings.
*
* @param content a {@link com.google.cloud.vertexai.api.Content} to send to the generative model
* @param safetySettings a list of {@link com.google.cloud.vertexai.api.SafetySetting} for
@@ -872,7 +873,7 @@ public ResponseStream generateContentStream(
}
/**
- * Generate content with streaming support from generative model given a single content,
+ * Generates content with streaming support from generative model given a single content,
* generation config, and safety settings.
*
* @param content a {@link com.google.cloud.vertexai.api.Content} to send to the generative model
@@ -894,7 +895,7 @@ public ResponseStream generateContentStream(
}
/**
- * Generate content with streaming support from generative model given a list of contents.
+ * Generates content with streaming support from generative model given a list of contents.
*
* @param contents a list of {@link com.google.cloud.vertexai.api.Content} to send to the
* generative model
@@ -908,7 +909,7 @@ public ResponseStream generateContentStream(List generateContentStream(
}
/**
- * Generate content with streaming support from generative model given a list of contents and
+ * Generates content with streaming support from generative model given a list of contents and
* safety settings.
*
* @param contents a list of {@link com.google.cloud.vertexai.api.Content} to send to the
@@ -948,7 +949,7 @@ public ResponseStream generateContentStream(
}
/**
- * Generate content with streaming support from generative model given a list of contents,
+ * Generates content with streaming support from generative model given a list of contents,
* generation config, and safety settings.
*
* @param contents a list of {@link com.google.cloud.vertexai.api.Content} to send to the
@@ -986,7 +987,7 @@ public ResponseStream generateContentStream(
}
/**
- * Generate content with streaming support from generative model given a list of contents and
+ * Generates content with streaming support from generative model given a list of contents and
* configs.
*
* @param contents a list of {@link com.google.cloud.vertexai.api.Content} to send to the
@@ -1134,7 +1135,7 @@ public ChatSession startChat() {
return new ChatSession(this);
}
- /** Keep the model name only, if users specify the resource name, and returns the model name. */
+ /** Keeps the model name only, if users specify the resource name, and returns the model name. */
private static String reconcileModelName(String modelName) {
for (String prefix : Constants.MODEL_NAME_PREFIXES) {
if (modelName.startsWith(prefix)) {
diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/PartMaker.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/PartMaker.java
index 32ed3b52a947..eb5ca4a49e56 100644
--- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/PartMaker.java
+++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/PartMaker.java
@@ -33,7 +33,8 @@ public class PartMaker {
private PartMaker() {}
/**
- * Make a {@link com.google.cloud.vertexai.api.Part} from mimeType and data (or link to the data).
+ * Makes a {@link com.google.cloud.vertexai.api.Part} from mimeType and data (or link to the
+ * data).
*
* @param mimeType currently accepted values are "image/png", "image/jpeg", "video/mp4",
* "video/mpeg", "video/quicktime", "video/x-msvideo", "video/x-ms-wmv", "video/x-flv"
@@ -84,7 +85,7 @@ public static Part fromMimeTypeAndData(String mimeType, Object partData) {
}
/**
- * Make a {@link com.google.cloud.vertexai.api.Part} from the output of {@link
+ * Makes a {@link com.google.cloud.vertexai.api.Part} from the output of {@link
* com.google.cloud.vertexai.api.FunctionCall}.
*
* @param name a string represents the name of the {@link
@@ -98,7 +99,7 @@ public static Part fromFunctionResponse(String name, Struct response) {
}
/**
- * Make a {@link com.google.cloud.vertexai.api.Part} from the result output of {@link
+ * Makes a {@link com.google.cloud.vertexai.api.Part} from the result output of {@link
* com.google.cloud.vertexai.api.FunctionCall}.
*
* @param name a string represents the name of the {@link
diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseStream.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseStream.java
index d1371dc4460f..b789588fae72 100644
--- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseStream.java
+++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseStream.java
@@ -43,7 +43,7 @@ public Iterator iterator() throws IllegalStateException
}
}
- /** Make a stream from the instance. */
+ /** Makes a stream from the instance. */
public Stream stream() {
return StreamSupport.stream(this.spliterator(), false);
}
diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseStreamIteratorWithHistory.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseStreamIteratorWithHistory.java
index a97432af4ce0..16a5db5ba9af 100644
--- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseStreamIteratorWithHistory.java
+++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseStreamIteratorWithHistory.java
@@ -46,7 +46,7 @@ public GenerateContentResponse next() {
return nextItem;
}
- /** Retrieve all the chunks in a stream of responses. */
+ /** Retrieves all the chunks in a stream of responses. */
public List getHistory() {
return history;
}