You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add support for partial failures sink in import rag files. ([07e471e](https://github.com/googleapis/python-aiplatform/commit/07e471e0a069551f2c855e167e549fa92ac6af95))
16
-
* Adding Feature Store Vector DB option for RAG corpuses to SDK ([cfc3421](https://github.com/googleapis/python-aiplatform/commit/cfc3421fe8a883d459b66ed8c9f39697ded23f20))
17
-
* Adding Pinecone Vector DB option for RAG corpuses to SDK ([f78b953](https://github.com/googleapis/python-aiplatform/commit/f78b953f561b8697d07a530e89c7e727db1161ed))
18
-
* Adding Vertex Vector Search Vector DB option for RAG corpuses to SDK ([f882657](https://github.com/googleapis/python-aiplatform/commit/f882657183e34c8e07baa4b8dc9f45ed8bca9db7))
19
-
* Allow customizing pipeline caching options for model evaluation jobs. ([73490b2](https://github.com/googleapis/python-aiplatform/commit/73490b22a239cb1a3c31349f8db6cfbc5232e231))
20
-
* GenAI - Switched the GA version of the `generative_models` classes to use the v1 service APIs instead of v1beta1 ([66d84af](https://github.com/googleapis/python-aiplatform/commit/66d84afdd5b20f70b3ff62f25cc32ac0b324d5d5))
21
-
22
-
23
-
### Bug Fixes
24
-
25
-
* GenAI - Fixed `GenerativeModel.compute_tokens` for v1 API ([0de2987](https://github.com/googleapis/python-aiplatform/commit/0de298786c43427cb1a20b91cbabd1ce921c16da))
26
-
* Tensorboard - Fix error in tensorboard batch upload of nested dirs ([ab157c8](https://github.com/googleapis/python-aiplatform/commit/ab157c8ead718b2a1a1d13306c1256c1cb2561f1))
For Gemini API and Generative AI on Vertex AI, please reference `Vertex Generative AI SDK for Python`_
9
-
.. _Vertex Generative AI SDK for Python: https://cloud.google.com/vertex-ai/generative-ai/docs/reference/python/latest
10
6
11
7
`Vertex AI`_: Google Vertex AI is an integrated suite of machine learning tools and services for building and using ML models with AutoML or custom code. It offers both novices and experts the best workbench for the entire machine learning development lifecycle.
12
8
@@ -117,6 +113,18 @@ Vertex AI SDK resource based functionality can be used by importing the followin
117
113
118
114
from google.cloud import aiplatform
119
115
116
+
Vertex AI SDK preview functionality can be used by importing the following namespace:
117
+
118
+
.. code-block:: Python
119
+
120
+
from vertexai import preview
121
+
122
+
Vertex AI SDK general availability (GA) functionality can be used by importing the following namespace:
123
+
124
+
.. code-block:: Python
125
+
126
+
import vertexai
127
+
120
128
Initialization
121
129
^^^^^^^^^^^^^^
122
130
Initialize the SDK to store common configurations that you use with the SDK.
For Gemini API and Generative AI on Vertex AI, please reference `Vertex Generative AI SDK for Python`_
9
-
.. _Vertex Generative AI SDK for Python: https://cloud.google.com/vertex-ai/generative-ai/docs/reference/python/latest
4
+
|GA| |pypi| |versions|
10
5
11
6
`Vertex AI`_: Google Vertex AI is an integrated suite of machine learning tools and services for building and using ML models with AutoML or custom code. It offers both novices and experts the best workbench for the entire machine learning development lifecycle.
from vertexai.preview.generative_models import GenerativeModel, Tool, FunctionDeclaration, AutomaticFunctionCallingResponder
142
137
143
138
# First, create functions that the model can use to answer your questions.
@@ -184,7 +179,7 @@ print(chat.send_message("What is the weather like in Boston?"))
184
179
185
180
- To perform bring-your-own-response(BYOR) evaluation, provide the model responses in the `response` column in the dataset. If a pairwise metric is used for BYOR evaluation, provide the baseline model responses in the `baseline_model_response` column.
186
181
187
-
```python
182
+
```
188
183
import pandas as pd
189
184
from vertexai.evaluation import EvalTask, MetricPromptTemplateExamples
- To perform evaluation with Gemini model inference, specify the `model` parameter with a `GenerativeModel` instance. The input column name to the model is `prompt` and must be present in the dataset.
210
205
211
-
```python
206
+
```
212
207
from vertexai.evaluation import EvalTask
213
208
from vertexai.generative_models import GenerativeModel
214
209
@@ -228,7 +223,7 @@ result = EvalTask(
228
223
229
224
- If a `prompt_template` is specified, the `prompt` column is not required. Prompts can be assembled from the evaluation dataset, and all prompt template variable names must be present in the dataset columns.
230
225
231
-
```python
226
+
```
232
227
import pandas as pd
233
228
from vertexai.evaluation import EvalTask, MetricPromptTemplateExamples
234
229
from vertexai.generative_models import GenerativeModel
@@ -250,7 +245,7 @@ result = EvalTask(
250
245
parameter with a custom inference function. The input column name to the
251
246
custom inference function is `prompt` and must be present in the dataset.
252
247
253
-
```python
248
+
```
254
249
from openai import OpenAI
255
250
from vertexai.evaluation import EvalTask, MetricPromptTemplateExamples
256
251
@@ -284,7 +279,7 @@ the `baseline_model` input to a `PairwiseMetric` instance and the candidate
284
279
`model` input to the `EvalTask.evaluate()` function. The input column name
285
280
to both models is `prompt` and must be present in the dataset.
286
281
287
-
```python
282
+
```
288
283
import pandas as pd
289
284
from vertexai.evaluation import EvalTask, MetricPromptTemplateExamples, PairwiseMetric
290
285
from vertexai.generative_models import GenerativeModel
0 commit comments