Skip to content

Commit a9f72d1

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
docs: update generated SDK docstring examples to use gemini-flash-latest
PiperOrigin-RevId: 993663482
1 parent d20094a commit a9f72d1

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎agentplatform/_genai/evals.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3070,7 +3070,7 @@ def run_inference(
30703070
events are replayed as session history for local ADK agents.
30713071
model: Optional type is experimental and may change in future versions.
30723072
The model to use for inference, optional for agent evaluations.
3073-
- For Google Gemini models, provide the model name string (e.g., "gemini-2.5-flash").
3073+
- For Google Gemini models, provide the model name string (e.g., "gemini-flash-latest").
30743074
- For third-party models via LiteLLM, use the format "provider/model_name"
30753075
(e.g., "openai/gpt-4o"). Ensure the necessary API key (e.g., OPENAI_API_KEY)
30763076
is set as an environment variable.
@@ -3342,7 +3342,7 @@ def generate_rubrics(
33423342
with the content.
33433343
generator_model_config: Optional. Configuration for the model used
33443344
in custom rubric generation. Only used if `prompt_template` is provided.
3345-
e.g., {"autorater_model": "gemini-2.5-flash"}.
3345+
e.g., {"autorater_model": "gemini-flash-latest"}.
33463346
rubric_content_type: Optional. The type of rubric content to be
33473347
generated. Only used if `prompt_template` is provided.
33483348
rubric_type_ontology: Optional. A pre-defined list of allowed types
@@ -3619,12 +3619,12 @@ def create_evaluation_run(
36193619
If provided, `agent_info` must be None. If omitted and `agent_info` is provided,
36203620
this will be automatically constructed using `agent_info` and `user_simulator_config`.
36213621
The `model` field of an inference config accepts a short Gemini model
3622-
name (e.g. `gemini-2.5-flash`), which is automatically expanded to a
3622+
name (e.g. `gemini-flash-latest`), which is automatically expanded to a
36233623
fully-qualified resource name using the client's project and location,
36243624
or an already fully-qualified publisher-model or endpoint resource
36253625
name.
36263626
Example:
3627-
{"candidate-1": types.EvaluationRunInferenceConfig(model="gemini-2.5-flash")}
3627+
{"candidate-1": types.EvaluationRunInferenceConfig(model="gemini-flash-latest")}
36283628
labels: The labels to apply to the evaluation run.
36293629
loss_analysis_metrics: This field is experimental and may change in future
36303630
versions. Optional list of metrics to run loss analysis on. The
@@ -6261,12 +6261,12 @@ async def create_evaluation_run(
62616261
If provided, `agent_info` must be None. If omitted and `agent_info` is provided,
62626262
this will be automatically constructed using `agent_info` and `user_simulator_config`.
62636263
The `model` field of an inference config accepts a short Gemini model
6264-
name (e.g. `gemini-2.5-flash`), which is automatically expanded to a
6264+
name (e.g. `gemini-flash-latest`), which is automatically expanded to a
62656265
fully-qualified resource name using the client's project and location,
62666266
or an already fully-qualified publisher-model or endpoint resource
62676267
name.
62686268
Example:
6269-
{"candidate-1": types.EvaluationRunInferenceConfig(model="gemini-2.5-flash")}
6269+
{"candidate-1": types.EvaluationRunInferenceConfig(model="gemini-flash-latest")}
62706270
red_teaming_config: This field is experimental and may change in future
62716271
versions. Optional configuration for automated Agent Red Teaming
62726272
analysis. Specifies attack categories and vulnerable tools to

‎agentplatform/_genai/types/common.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2238,7 +2238,7 @@ class EvaluationRunInferenceConfig(_common.BaseModel):
22382238
)
22392239
model: Optional[str] = Field(
22402240
default=None,
2241-
description="""The model to use for inference. Accepts a short Gemini model name (e.g. `gemini-2.5-flash`), which is automatically expanded to a fully-qualified resource name using the client's project and location, or an already fully-qualified publisher-model or endpoint resource name (e.g. `projects/{project}/locations/{location}/publishers/google/models/gemini-2.5-flash`).""",
2241+
description="""The model to use for inference. Accepts a short Gemini model name (e.g. `gemini-flash-latest`), which is automatically expanded to a fully-qualified resource name using the client's project and location, or an already fully-qualified publisher-model or endpoint resource name (e.g. `projects/{project}/locations/{location}/publishers/google/models/gemini-flash-latest`).""",
22422242
)
22432243
prompt_template: Optional[EvaluationRunPromptTemplate] = Field(
22442244
default=None, description="""The prompt template used for inference."""
@@ -2260,7 +2260,7 @@ class EvaluationRunInferenceConfigDict(TypedDict, total=False):
22602260
"""The agent config."""
22612261

22622262
model: Optional[str]
2263-
"""The model to use for inference. Accepts a short Gemini model name (e.g. `gemini-2.5-flash`), which is automatically expanded to a fully-qualified resource name using the client's project and location, or an already fully-qualified publisher-model or endpoint resource name (e.g. `projects/{project}/locations/{location}/publishers/google/models/gemini-2.5-flash`)."""
2263+
"""The model to use for inference. Accepts a short Gemini model name (e.g. `gemini-flash-latest`), which is automatically expanded to a fully-qualified resource name using the client's project and location, or an already fully-qualified publisher-model or endpoint resource name (e.g. `projects/{project}/locations/{location}/publishers/google/models/gemini-flash-latest`)."""
22642264

22652265
prompt_template: Optional[EvaluationRunPromptTemplateDict]
22662266
"""The prompt template used for inference."""
@@ -31000,7 +31000,7 @@ def assemble_contents(self) -> list[genai_types.Content]:
3100031000

3100131001
my_prompt = types.Prompt(
3100231002
prompt_data=types.PromptData(
31003-
model="gemini-2.0-flash-001",
31003+
model="gemini-flash-latest",
3100431004
contents=[
3100531005
genai_types.Content(
3100631006
parts=[

0 commit comments

Comments
 (0)