Skip to content

Commit 0b9f8f8

Browse files
yeesiancopybara-github
authored andcommitted
fix: Update examples_dataframe type to PandasDataFrame in Prompt Optimizer.
PiperOrigin-RevId: 852812854
1 parent cffa558 commit 0b9f8f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vertexai/_genai/types/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3796,7 +3796,7 @@ class OptimizeConfig(_common.BaseModel):
37963796
default=None,
37973797
description="""The optimization target for the prompt optimizer. It must be one of the OptimizeTarget enum values: OPTIMIZATION_TARGET_GEMINI_NANO for the prompts from Android core API, OPTIMIZATION_TARGET_FEW_SHOT_RUBRICS for the few-shot prompt optimizer with rubrics, OPTIMIZATION_TARGET_FEW_SHOT_TARGET_RESPONSE for the few-shot prompt optimizer with target responses.""",
37983798
)
3799-
examples_dataframe: Optional[pd.DataFrame] = Field(
3799+
examples_dataframe: Optional[PandasDataFrame] = Field(
38003800
default=None,
38013801
description="""The examples dataframe for the few-shot prompt optimizer. It must contain "prompt" and "model_response" columns. Depending on which optimization target is used, it also needs to contain "rubrics" and "rubrics_evaluations" or "target_response" columns.""",
38023802
)
@@ -3811,7 +3811,7 @@ class OptimizeConfigDict(TypedDict, total=False):
38113811
optimization_target: Optional[OptimizeTarget]
38123812
"""The optimization target for the prompt optimizer. It must be one of the OptimizeTarget enum values: OPTIMIZATION_TARGET_GEMINI_NANO for the prompts from Android core API, OPTIMIZATION_TARGET_FEW_SHOT_RUBRICS for the few-shot prompt optimizer with rubrics, OPTIMIZATION_TARGET_FEW_SHOT_TARGET_RESPONSE for the few-shot prompt optimizer with target responses."""
38133813

3814-
examples_dataframe: Optional[pd.DataFrame]
3814+
examples_dataframe: Optional[PandasDataFrame]
38153815
"""The examples dataframe for the few-shot prompt optimizer. It must contain "prompt" and "model_response" columns. Depending on which optimization target is used, it also needs to contain "rubrics" and "rubrics_evaluations" or "target_response" columns."""
38163816

38173817

0 commit comments

Comments
 (0)