@@ -941,6 +941,8 @@ def score(
941941 prompt : PROMPT_TYPE ,
942942 * ,
943943 connection_id : str | None = None ,
944+ endpoint : str | None = None ,
945+ max_error_ratio : float | None = None ,
944946) -> series .Series :
945947 """
946948 Computes a score based on rubrics described in natural language. It will return a double value.
@@ -958,20 +960,21 @@ def score(
958960 2 3.0
959961 dtype: Float64
960962
961- .. note::
962-
963- This product or feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the
964- Service Specific Terms(https://cloud.google.com/terms/service-terms#1). Pre-GA products and features are available "as is"
965- and might have limited support. For more information, see the launch stage descriptions
966- (https://cloud.google.com/products#product-launch-stages).
967-
968963 Args:
969964 prompt (str | Series | List[str|Series] | Tuple[str|Series, ...]):
970965 A mixture of Series and string literals that specifies the prompt to send to the model. The Series can be BigFrames Series
971966 or pandas Series.
972967 connection_id (str, optional):
973968 Specifies the connection to use to communicate with the model. For example, `myproject.us.myconnection`.
974969 If not provided, the query uses your end-user credential.
970+ endpoint (str, optional):
971+ Specifies the Vertex AI endpoint to use for the model. For example `"gemini-2.5-flash"`. You can specify any
972+ generally available or preview Gemini model. If you specify the model name, BigQuery ML automatically identifies and
973+ uses the full endpoint of the model. If you don't specify an ENDPOINT value, BigQuery ML dynamically chooses a model
974+ based on your query to have the best cost to quality tradeoff for the task.
975+ max_error_ratio (float, optional):
976+ A value between `0.0` and `1.0` that contains the maximum acceptable ratio of row-level inference failures to
977+ rows processed on this function. If this value is exceeded, then the query fails.
975978
976979 Returns:
977980 bigframes.series.Series: A new series of double (float) values.
@@ -983,6 +986,8 @@ def score(
983986 operator = ai_ops .AIScore (
984987 prompt_context = tuple (prompt_context ),
985988 connection_id = connection_id ,
989+ endpoint = endpoint ,
990+ max_error_ratio = max_error_ratio ,
986991 )
987992
988993 return series_list [0 ]._apply_nary_op (operator , series_list [1 :])
0 commit comments