File tree Expand file tree Collapse file tree
packages/bigframes/bigframes
core/compile/sqlglot/expressions Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 (
You can’t perform that action at this time.
0 commit comments