We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc226f7 commit 5ba4930Copy full SHA for 5ba4930
libs/vertexai/langchain_google_vertexai/chat_models.py
@@ -622,6 +622,8 @@ def _append_to_content(
622
623
624
def _json_safe_number(value: float) -> Union[str, float]:
625
+ # Gemini tool calls sometimes surface +/-inf or NaN; JSON forbids those, so
626
+ # coerce them to string markers before we hand them to json.dumps.
627
if math.isnan(value):
628
return "NaN"
629
if math.isinf(value):
0 commit comments