Skip to content

Commit e3593c2

Browse files
committed
fix AI commits
1 parent 08a8ffa commit e3593c2

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

  • packages/bigframes/bigframes

packages/bigframes/bigframes/bigquery/_operations/ai.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,9 +819,9 @@ def if_(
819819
connection_id: str | None = None,
820820
endpoint: str | None = None,
821821
optimization_mode: Literal["minimize_cost", "maximize_quality"] = "minimize_cost",
822-
max_error_ratio: float = 1.0,
823-
) -> series.Series:
824822
max_error_ratio: float | None = None,
823+
) -> series.Series:
824+
"""
825825
Evaluates the prompt to True or False. Compared to `ai.generate_bool()`, this function
826826
provides optimization such that not all rows are evaluated with the LLM.
827827

packages/bigframes/bigframes/core/compile/sqlglot/expressions/ai_ops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ def _construct_named_args(op: ops.ScalarOp) -> list[sge.Kwarg]:
139139
expression=sge.JSON(this=sge.Literal.string(value)),
140140
)
141141
)
142-
elif field == "optimization_mode" and value is not None:
142+
elif field == "optimization_mode":
143143
args.append(
144144
sge.Kwarg(this=field, expression=sge.Literal.string(value.upper()))
145145
)
146-
elif field == "max_error_ratio" and value is not None:
146+
elif field == "max_error_ratio":
147147
args.append(sge.Kwarg(this=field, expression=sge.Literal.number(value)))
148148
elif field == "request_type":
149149
args.append(

0 commit comments

Comments
 (0)