@google/genai 1.50.1 → 1.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  The Google Gen AI JavaScript SDK is designed for
12
12
  TypeScript and JavaScript developers to build applications powered by Gemini. The SDK
13
13
  supports both the [Gemini Developer API](https://ai.google.dev/gemini-api/docs)
14
- and [Vertex AI](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview).
14
+ and [Gemini Enterprise Agent Platform](https://docs.cloud.google.com/gemini-enterprise-agent-platform).
15
15
 
16
16
  The Google Gen AI SDK is designed to work with Gemini 2.0+ features.
17
17
 
@@ -29,7 +29,7 @@ We recommend using our Code Generation instructions [`codegen_instructions.md`](
29
29
 
30
30
  1. Node.js version 20 or later
31
31
 
32
- ### The following are required for Vertex AI users (excluding Vertex AI Studio)
32
+ ### The following are required for Gemini Enterprise Agent Platform users (excluding Vertex AI Studio)
33
33
  1. [Select](https://console.cloud.google.com/project) or [create](https://cloud.google.com/resource-manager/docs/creating-managing-projects#creating_a_project) a Google Cloud project.
34
34
  1. [Enable billing for your project](https://cloud.google.com/billing/docs/how-to/modify-project).
35
35
  1. [Enable the Vertex AI API](https://console.cloud.google.com/flows/enableapi?apiid=aiplatform.googleapis.com).
@@ -77,7 +77,7 @@ main();
77
77
 
78
78
  The Google Gen AI SDK provides support for both the
79
79
  [Google AI Studio](https://ai.google.dev/gemini-api/docs) and
80
- [Vertex AI](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview)
80
+ [Gemini Enterprise Agent Platform](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview)
81
81
  implementations of the Gemini API.
82
82
 
83
83
  ### Gemini Developer API
@@ -104,15 +104,15 @@ import { GoogleGenAI } from '@google/genai';
104
104
  const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'});
105
105
  ```
106
106
 
107
- ### Vertex AI
107
+ ### Gemini Enterprise Agent Platform
108
108
 
109
- Sample code for VertexAI initialization:
109
+ Sample code for Gemini Enterprise Agent Platform initialization:
110
110
 
111
111
  ```typescript
112
112
  import { GoogleGenAI } from '@google/genai';
113
113
 
114
114
  const ai = new GoogleGenAI({
115
- vertexai: true,
115
+ enterprise: true,
116
116
  project: 'your_project',
117
117
  location: 'your_location',
118
118
  });
@@ -122,7 +122,7 @@ const ai = new GoogleGenAI({
122
122
 
123
123
  For NodeJS environments, you can create a client by configuring the necessary
124
124
  environment variables. Configuration setup instructions depends on whether
125
- you're using the Gemini Developer API or the Gemini API in Vertex AI.
125
+ you're using the Gemini Developer API or the Gemini Enterprise Agent Platform.
126
126
 
127
127
  **Gemini Developer API:** Set `GOOGLE_API_KEY` as shown below:
128
128
 
@@ -130,11 +130,11 @@ you're using the Gemini Developer API or the Gemini API in Vertex AI.
130
130
  export GOOGLE_API_KEY='your-api-key'
131
131
  ```
132
132
 
133
- **Gemini API on Vertex AI:** Set `GOOGLE_GENAI_USE_VERTEXAI`,
133
+ **Gemini Enterprise Agent Platform:** Set `GOOGLE_GENAI_USE_ENTERPRISE`,
134
134
  `GOOGLE_CLOUD_PROJECT` and `GOOGLE_CLOUD_LOCATION`, as shown below:
135
135
 
136
136
  ```bash
137
- export GOOGLE_GENAI_USE_VERTEXAI=true
137
+ export GOOGLE_GENAI_USE_ENTERPRISE=true
138
138
  export GOOGLE_CLOUD_PROJECT='your-project-id'
139
139
  export GOOGLE_CLOUD_LOCATION='us-central1'
140
140
  ```
@@ -152,11 +152,11 @@ preview features in the APIs. The stable API endpoints can be selected by
152
152
  setting the API version to `v1`.
153
153
 
154
154
  To set the API version use `apiVersion`. For example, to set the API version to
155
- `v1` for Vertex AI:
155
+ `v1` for Gemini Enterprise Agent Platform:
156
156
 
157
157
  ```typescript
158
158
  const ai = new GoogleGenAI({
159
- vertexai: true,
159
+ enterprise: true,
160
160
  project: 'your_project',
161
161
  location: 'your_location',
162
162
  apiVersion: 'v1'
@@ -600,7 +600,7 @@ for (const output of interaction.outputs!) {
600
600
  This SDK (`@google/genai`) is Google Deepmind’s "vanilla" SDK for its generative
601
601
  AI offerings, and is where Google Deepmind adds new AI features.
602
602
 
603
- Models hosted either on the [Vertex AI platform](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview) or the [Gemini Developer platform](https://ai.google.dev/gemini-api/docs) are accessible through this SDK.
603
+ Models hosted either on the [Gemini Enterprise Agent Platform](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/overview) or the [Gemini Developer platform](https://ai.google.dev/gemini-api/docs) are accessible through this SDK.
604
604
 
605
605
  Other SDKs may be offering additional AI frameworks on top of this SDK, or may
606
606
  be targeting specific project environments (like Firebase).