Skip to content

Commit 63e1caa

Browse files
sararobcopybara-github
authored andcommitted
fix: GenAI SDK client - Fix typo in error message for optimize_prompt
PiperOrigin-RevId: 792273838
1 parent 6c15762 commit 63e1caa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vertexai/_genai/_prompt_optimizer_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"""Utility functions for prompt optimizer."""
1616

1717
import json
18-
from google.genai import errors
1918
from . import types
2019

2120

@@ -65,7 +64,8 @@ def _clean_and_parse_optimized_prompt(output_str: str):
6564
try:
6665
return json.loads(cleaned_string)
6766
except json.JSONDecodeError as e:
68-
raise errors.ClinentError(
67+
# TODO(b/437144880): raise errors.ClientError here instead
68+
raise ValueError(
6969
f"Failed to parse the response from prompt optimizer endpoint. {e}"
7070
) from e
7171

0 commit comments

Comments
 (0)