Skip to content

Commit 033b5f4

Browse files
docs: [vertexai] Add deprecation notice for generativeai package (#11637)
docs: [vertexai] Add deprecation notice for generativeai package Co-authored-by: Jaycee Li <[email protected]>
1 parent 8cc7c69 commit 033b5f4

File tree

11 files changed

+82
-9
lines changed

11 files changed

+82
-9
lines changed

java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/AutomaticFunctionCallingResponder.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,14 @@
3232
import java.util.Map;
3333
import java.util.logging.Logger;
3434

35-
/** A responder that automatically calls functions when requested by the GenAI model. */
35+
/**
36+
* A responder that automatically calls functions when requested by the GenAI model.
37+
*
38+
* @deprecated This class and its package are deprecated. See the <a
39+
* href="https://cloud.google.com/vertex-ai/generative-ai/docs/deprecations/genai-vertexai-sdk#java">
40+
* migration guide</a> for more details.
41+
*/
42+
@Deprecated
3643
public final class AutomaticFunctionCallingResponder {
3744
private int maxFunctionCalls = 1;
3845
private int remainingFunctionCalls;

java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ChatSession.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@
4040
* Represents a conversation between the user and the model.
4141
*
4242
* <p>Note: this class is NOT thread-safe.
43+
*
44+
* @deprecated This class and its package are deprecated. See the <a
45+
* href="https://cloud.google.com/vertex-ai/generative-ai/docs/deprecations/genai-vertexai-sdk#java">
46+
* migration guide</a> for more details.
4347
*/
48+
@Deprecated
4449
public final class ChatSession {
4550
private final GenerativeModel model;
4651
private final Optional<ChatSession> rootChatSession;

java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/Constants.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@
1818

1919
import com.google.common.collect.ImmutableSet;
2020

21-
/** A class that holds all constants for vertexai/generativeai. */
21+
/**
22+
* A class that holds all constants for vertexai/generativeai.
23+
*
24+
* @deprecated This class and its package are deprecated. See the <a
25+
* href="https://cloud.google.com/vertex-ai/generative-ai/docs/deprecations/genai-vertexai-sdk#java">
26+
* migration guide</a> for more details.
27+
*/
28+
@Deprecated
2229
public final class Constants {
2330
public static final String MODEL_NAME_PREFIX_PROJECTS = "projects/";
2431
public static final String MODEL_NAME_PREFIX_PUBLISHERS = "publishers/";

java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ContentMaker.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@
2222
import com.google.cloud.vertexai.api.Part;
2323
import com.google.common.base.Strings;
2424

25-
/** Helper class to create content. */
25+
/**
26+
* Helper class to create content.
27+
*
28+
* @deprecated This class and its package are deprecated. See the <a
29+
* href="https://cloud.google.com/vertex-ai/generative-ai/docs/deprecations/genai-vertexai-sdk#java">
30+
* migration guide</a> for more details.
31+
*/
32+
@Deprecated
2633
public class ContentMaker {
2734
private static final String DEFAULT_ROLE = "user";
2835

java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/FunctionDeclarationMaker.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@
2929
import java.lang.reflect.Modifier;
3030
import java.lang.reflect.Parameter;
3131

32-
/** Helper class to create {@link com.google.cloud.vertexai.api.FunctionDeclaration} */
32+
/**
33+
* Helper class to create {@link com.google.cloud.vertexai.api.FunctionDeclaration}
34+
*
35+
* @deprecated This class and its package are deprecated. See the <a
36+
* href="https://cloud.google.com/vertex-ai/generative-ai/docs/deprecations/genai-vertexai-sdk#java">
37+
* migration guide</a> for more details.
38+
*/
39+
@Deprecated
3340
public final class FunctionDeclarationMaker {
3441

3542
/**

java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/GenerativeModel.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@
4545
*
4646
* <p>Note: The instances of {@link ChatSession} returned by {@link GenerativeModel#startChat()} are
4747
* NOT thread-safe.
48+
*
49+
* @deprecated This class and its package are deprecated. See the <a
50+
* href="https://cloud.google.com/vertex-ai/generative-ai/docs/deprecations/genai-vertexai-sdk#java">
51+
* migration guide</a> for more details.
4852
*/
53+
@Deprecated
4954
public final class GenerativeModel {
5055
private final String modelName;
5156
private final String resourceName;

java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/PartMaker.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@
2727
import java.net.URI;
2828
import java.util.Map;
2929

30-
/** Helper class to create {@link com.google.cloud.vertexai.api.Part} */
30+
/**
31+
* Helper class to create {@link com.google.cloud.vertexai.api.Part}
32+
*
33+
* @deprecated This class and its package are deprecated. See the <a
34+
* href="https://cloud.google.com/vertex-ai/generative-ai/docs/deprecations/genai-vertexai-sdk#java">
35+
* migration guide</a> for more details.
36+
*/
37+
@Deprecated
3138
public class PartMaker {
3239

3340
private PartMaker() {}

java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseHandler.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,14 @@
3030
import java.util.List;
3131
import java.util.Map;
3232

33-
/** Helper class to post-process GenerateContentResponse. */
33+
/**
34+
* Helper class to post-process GenerateContentResponse.
35+
*
36+
* @deprecated This class and its package are deprecated. See the <a
37+
* href="https://cloud.google.com/vertex-ai/generative-ai/docs/deprecations/genai-vertexai-sdk#java">
38+
* migration guide</a> for more details.
39+
*/
40+
@Deprecated
3441
public class ResponseHandler {
3542

3643
/**

java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseStream.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@
2121
import java.util.stream.Stream;
2222
import java.util.stream.StreamSupport;
2323

24-
/** An iterable of GenerateContentResponse. */
24+
/**
25+
* An iterable of GenerateContentResponse.
26+
*
27+
* @deprecated This class and its package are deprecated. See the <a
28+
* href="https://cloud.google.com/vertex-ai/generative-ai/docs/deprecations/genai-vertexai-sdk#java">
29+
* migration guide</a> for more details.
30+
*/
31+
@Deprecated
2532
public class ResponseStream<GenerateContentResponse> implements Iterable<GenerateContentResponse> {
2633

2734
private ResponseStreamIteratorWithHistory<GenerateContentResponse> iteratorWithHistory;

java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/generativeai/ResponseStreamIteratorWithHistory.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@
2121
import java.util.Iterator;
2222
import java.util.List;
2323

24-
/** Iterator of the ResponseStream that holds the response chunks. */
24+
/**
25+
* Iterator of the ResponseStream that holds the response chunks.
26+
*
27+
* @deprecated This class and its package are deprecated. See the <a
28+
* href="https://cloud.google.com/vertex-ai/generative-ai/docs/deprecations/genai-vertexai-sdk#java">
29+
* migration guide</a> for more details.
30+
*/
31+
@Deprecated
2532
public class ResponseStreamIteratorWithHistory<GenerateContentResponse>
2633
implements Iterator<GenerateContentResponse> {
2734
Iterator serverStreamIterator = null;

0 commit comments

Comments
 (0)