|
30 | 30 | from tests.system.aiplatform import e2e_base |
31 | 31 | from google import auth |
32 | 32 |
|
| 33 | +MODEL_NAME = "gemini-2.5-flash" |
| 34 | + |
33 | 35 | _REQUEST_FUNCTION_PARAMETER_SCHEMA_STRUCT = { |
34 | 36 | "type": "object", |
35 | 37 | "properties": { |
@@ -74,7 +76,7 @@ def test_create_prompt_with_variables(self): |
74 | 76 | {"name": "Bob", "day": "Tuesday"}, |
75 | 77 | ], |
76 | 78 | generation_config=GenerationConfig(temperature=0.1), |
77 | | - model_name="gemini-1.5-pro-002", |
| 79 | + model_name=MODEL_NAME, |
78 | 80 | safety_settings=[ |
79 | 81 | SafetySetting( |
80 | 82 | category=SafetySetting.HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT, |
@@ -140,11 +142,11 @@ def test_create_prompt_with_function_calling(self): |
140 | 142 | prompt_data="What is the weather like in Boston?", |
141 | 143 | tools=[weather_tool], |
142 | 144 | tool_config=tool_config, |
143 | | - model_name="gemini-1.5-pro-002", |
| 145 | + model_name=MODEL_NAME, |
144 | 146 | ) |
145 | 147 |
|
146 | 148 | # (Optional) Create a separate prompt resource to save the version to |
147 | | - prompt_temp = Prompt(model_name="gemini-1.5-pro-002") |
| 149 | + prompt_temp = Prompt(model_name=MODEL_NAME) |
148 | 150 | prompt_temp1 = prompts.create_version(prompt=prompt_temp, version_name="empty") |
149 | 151 |
|
150 | 152 | # Create a new version to an existing prompt |
@@ -190,6 +192,6 @@ def test_get_prompt_with_function_calling(self): |
190 | 192 |
|
191 | 193 | # Generate content using the prompt |
192 | 194 | response = prompt.generate_content( |
193 | | - model_name="gemini-1.5-pro-002", contents=prompt.assemble_contents() |
| 195 | + model_name=MODEL_NAME, contents=prompt.assemble_contents() |
194 | 196 | ) |
195 | 197 | assert response |
0 commit comments