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
{{ message }}
This repository was archived by the owner on Apr 1, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: bigframes/ml/llm.py
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@
21
21
22
22
importbigframes_vendored.constantsasconstants
23
23
fromgoogle.cloudimportbigquery
24
+
importtyping_extensions
24
25
25
26
frombigframesimportdtypes, exceptions
26
27
importbigframes.bigqueryasbbq
@@ -113,17 +114,28 @@
113
114
)
114
115
115
116
117
+
@typing_extensions.deprecated(
118
+
"text-embedding-004 is going to be deprecated. Use text-embedding-005 (https://cloud.google.com/python/docs/reference/bigframes/latest/bigframes.ml.llm.TextEmbeddingGenerator) instead. ",
text-embedding-004 is going to be deprecated. Use text-embedding-005( https://cloud.google.com/python/docs/reference/bigframes/latest/bigframes.ml.llm.TextEmbeddingGenerator) instead.
127
+
120
128
Args:
121
129
model_name (str, Default to "text-embedding-004"):
122
130
The model for text embedding. Possible values are "text-embedding-005", "text-embedding-004"
123
131
or "text-multilingual-embedding-002". text-embedding models returns model embeddings for text inputs.
124
132
text-multilingual-embedding models returns model embeddings for text inputs which support over 100 languages.
125
133
If no setting is provided, "text-embedding-004" will be used by
126
134
default and a warning will be issued.
135
+
136
+
.. note::
137
+
"text-embedding-004" is going to be deprecated. Bigframes 3 will transition to using text-embedding-004.
138
+
127
139
session (bigframes.Session or None):
128
140
BQ session to create the model. If None, use the global default session.
"gemini-1.5-X are going to be deprecated. Use gemini-2.0-X (https://cloud.google.com/python/docs/reference/bigframes/latest/bigframes.ml.llm.GeminiTextGenerator) instead. ",
@@ -416,6 +432,7 @@ class GeminiTextGenerator(base.RetriableRemotePredictor):
416
432
default and a warning will be issued.
417
433
418
434
.. note::
435
+
"gemini-1.5-X" is going to be deprecated. Bigframes 2 will transition to using gemini-2.0-X.
419
436
"gemini-2.0-flash-exp", "gemini-1.5-pro-preview-0514" and "gemini-1.5-flash-preview-0514" is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the
420
437
Service Specific Terms(https://cloud.google.com/terms/service-terms#1). Pre-GA products and features are available "as is"
421
438
and might have limited support. For more information, see the launch stage descriptions
Copy file name to clipboardExpand all lines: notebooks/generative_ai/large_language_models.ipynb
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
"cells": [
3
3
{
4
4
"cell_type": "code",
5
-
"execution_count": 1,
5
+
"execution_count": 2,
6
6
"metadata": {},
7
7
"outputs": [],
8
8
"source": [
@@ -21,23 +21,23 @@
21
21
},
22
22
{
23
23
"cell_type": "code",
24
-
"execution_count": 2,
24
+
"execution_count": 3,
25
25
"metadata": {},
26
26
"outputs": [
27
27
{
28
28
"name": "stderr",
29
29
"output_type": "stream",
30
30
"text": [
31
-
"/tmp/ipykernel_604997/3896046356.py:1: ApiDeprecationWarning: gemini-pro and gemini-1.5-X are going to be deprecated. Use gemini-2.0-X (https://cloud.google.com/python/docs/reference/bigframes/latest/bigframes.ml.llm.GeminiTextGenerator) instead. \n",
32
-
" model = GeminiTextGenerator(model_name=\"gemini-1.5-flash-002\")\n",
33
-
"/usr/local/google/home/shuowei/src/python-bigquery-dataframes/bigframes/ml/llm.py:981: DefaultLocationWarning: No explicit location is set, so using location US for the session.\n",
31
+
"/tmp/ipykernel_176683/987800245.py:1: ApiDeprecationWarning: gemini-1.5-X are going to be deprecated. Use gemini-2.0-X (https://cloud.google.com/python/docs/reference/bigframes/latest/bigframes.ml.llm.GeminiTextGenerator) instead. \n",
32
+
" model = GeminiTextGenerator(model_name=\"gemini-2.0-flash-001\")\n",
33
+
"/usr/local/google/home/shuowei/src/python-bigquery-dataframes/bigframes/ml/llm.py:486: DefaultLocationWarning: No explicit location is set, so using location US for the session.\n",
34
34
" self.session = session or global_session.get_global_session()\n"
0 commit comments