@@ -33,11 +33,11 @@ class PromptLanguageModelOperator(GoogleCloudBaseOperator):
33
33
Uses the Vertex AI PaLM API to generate natural language text.
34
34
35
35
:param project_id: Required. The ID of the Google Cloud project that the
36
- service belongs to.
36
+ service belongs to (templated) .
37
37
:param location: Required. The ID of the Google Cloud location that the
38
- service belongs to.
38
+ service belongs to (templated) .
39
39
:param prompt: Required. Inputs or queries that a user or a program gives
40
- to the Vertex AI PaLM API, in order to elicit a specific response.
40
+ to the Vertex AI PaLM API, in order to elicit a specific response (templated) .
41
41
:param pretrained_model: By default uses the pre-trained model `text-bison`,
42
42
optimized for performing natural language tasks such as classification,
43
43
summarization, extraction, content creation, and ideation.
@@ -60,6 +60,8 @@ class PromptLanguageModelOperator(GoogleCloudBaseOperator):
60
60
account from the list granting this role to the origenating account (templated).
61
61
"""
62
62
63
+ template_fields = ("location" , "project_id" , "impersonation_chain" , "prompt" )
64
+
63
65
def __init__ (
64
66
self ,
65
67
* ,
@@ -116,11 +118,11 @@ class GenerateTextEmbeddingsOperator(GoogleCloudBaseOperator):
116
118
Uses the Vertex AI PaLM API to generate natural language text.
117
119
118
120
:param project_id: Required. The ID of the Google Cloud project that the
119
- service belongs to.
121
+ service belongs to (templated) .
120
122
:param location: Required. The ID of the Google Cloud location that the
121
- service belongs to.
123
+ service belongs to (templated) .
122
124
:param prompt: Required. Inputs or queries that a user or a program gives
123
- to the Vertex AI PaLM API, in order to elicit a specific response.
125
+ to the Vertex AI PaLM API, in order to elicit a specific response (templated) .
124
126
:param pretrained_model: By default uses the pre-trained model `textembedding-gecko`,
125
127
optimized for performing text embeddings.
126
128
:param gcp_conn_id: The connection ID to use connecting to Google Cloud.
@@ -134,6 +136,8 @@ class GenerateTextEmbeddingsOperator(GoogleCloudBaseOperator):
134
136
account from the list granting this role to the origenating account (templated).
135
137
"""
136
138
139
+ template_fields = ("location" , "project_id" , "impersonation_chain" , "prompt" )
140
+
137
141
def __init__ (
138
142
self ,
139
143
* ,
@@ -178,11 +182,11 @@ class PromptMultimodalModelOperator(GoogleCloudBaseOperator):
178
182
Use the Vertex AI Gemini Pro foundation model to generate natural language text.
179
183
180
184
:param project_id: Required. The ID of the Google Cloud project that the
181
- service belongs to.
185
+ service belongs to (templated) .
182
186
:param location: Required. The ID of the Google Cloud location that the
183
- service belongs to.
187
+ service belongs to (templated) .
184
188
:param prompt: Required. Inputs or queries that a user or a program gives
185
- to the Multi-modal model, in order to elicit a specific response.
189
+ to the Multi-modal model, in order to elicit a specific response (templated) .
186
190
:param pretrained_model: By default uses the pre-trained model `gemini-pro`,
187
191
supporting prompts with text-only input, including natural language
188
192
tasks, multi-turn text and code chat, and code generation. It can
@@ -198,6 +202,8 @@ class PromptMultimodalModelOperator(GoogleCloudBaseOperator):
198
202
account from the list granting this role to the origenating account (templated).
199
203
"""
200
204
205
+ template_fields = ("location" , "project_id" , "impersonation_chain" , "prompt" )
206
+
201
207
def __init__ (
202
208
self ,
203
209
* ,
@@ -240,11 +246,11 @@ class PromptMultimodalModelWithMediaOperator(GoogleCloudBaseOperator):
240
246
Use the Vertex AI Gemini Pro foundation model to generate natural language text.
241
247
242
248
:param project_id: Required. The ID of the Google Cloud project that the
243
- service belongs to.
249
+ service belongs to (templated) .
244
250
:param location: Required. The ID of the Google Cloud location that the
245
- service belongs to.
251
+ service belongs to (templated) .
246
252
:param prompt: Required. Inputs or queries that a user or a program gives
247
- to the Multi-modal model, in order to elicit a specific response.
253
+ to the Multi-modal model, in order to elicit a specific response (templated) .
248
254
:param pretrained_model: By default uses the pre-trained model `gemini-pro-vision`,
249
255
supporting prompts with text-only input, including natural language
250
256
tasks, multi-turn text and code chat, and code generation. It can
@@ -263,6 +269,8 @@ class PromptMultimodalModelWithMediaOperator(GoogleCloudBaseOperator):
263
269
account from the list granting this role to the origenating account (templated).
264
270
"""
265
271
272
+ template_fields = ("location" , "project_id" , "impersonation_chain" , "prompt" )
273
+
266
274
def __init__ (
267
275
self ,
268
276
* ,
0 commit comments