X (bigframes.dataframe.DataFrame or bigframes.series.Series):
247
-
Input DataFrame or Series, which contains only one column of prompts.
247
+
Input DataFrame or Series, can contain one or more columns. If multiple columns are in the DataFrame, it must contain a "prompt" column for prediction.
248
248
Prompts can include preamble, questions, suggestions, instructions, or examples.
249
249
250
250
temperature (float, default 0.0):
@@ -307,14 +307,10 @@ def predict(
307
307
308
308
(X,) =utils.convert_to_dataframe(X)
309
309
310
-
iflen(X.columns) !=1:
311
-
raiseValueError(
312
-
f"Only support one column as input. {constants.FEEDBACK_LINK}"
X (bigframes.dataframe.DataFrame or bigframes.series.Series):
525
-
Input DataFrame, which needs to contain a column with name "content". Only the column will be used as input. Content can include preamble, questions, suggestions, instructions, or examples.
521
+
Input DataFrame or Series, can contain one or more columns. If multiple columns are in the DataFrame, it must contain a "content" column for prediction.
X (bigframes.dataframe.DataFrame or bigframes.series.Series):
682
-
Input DataFrame, which needs to contain a column with name "content". Only the column will be used as input. Content can include preamble, questions, suggestions, instructions, or examples.
674
+
Input DataFrame or Series, can contain one or more columns. If multiple columns are in the DataFrame, it must contain a "content" column for prediction.
f"Only support one column as input. {constants.FEEDBACK_LINK}"
694
-
)
695
-
696
-
# BQML identified the column by name
697
-
col_label=cast(blocks.Label, X.columns[0])
698
-
X=X.rename(columns={col_label: "content"})
683
+
iflen(X.columns) ==1:
684
+
# BQML identified the column by name
685
+
col_label=cast(blocks.Label, X.columns[0])
686
+
X=X.rename(columns={col_label: "content"})
699
687
700
688
options= {
701
689
"flatten_json_output": True,
@@ -893,7 +881,7 @@ def predict(
893
881
894
882
Args:
895
883
X (bigframes.dataframe.DataFrame or bigframes.series.Series):
896
-
Input DataFrame or Series, which contains only one column of prompts.
884
+
Input DataFrame or Series, can contain one or more columns. If multiple columns are in the DataFrame, it must contain a "prompt" column for prediction.
897
885
Prompts can include preamble, questions, suggestions, instructions, or examples.
898
886
899
887
temperature (float, default 0.9):
@@ -938,14 +926,10 @@ def predict(
938
926
939
927
(X,) =utils.convert_to_dataframe(X)
940
928
941
-
iflen(X.columns) !=1:
942
-
raiseValueError(
943
-
f"Only support one column as input. {constants.FEEDBACK_LINK}"
944
-
)
945
-
946
-
# BQML identified the column by name
947
-
col_label=cast(blocks.Label, X.columns[0])
948
-
X=X.rename(columns={col_label: "prompt"})
929
+
iflen(X.columns) ==1:
930
+
# BQML identified the column by name
931
+
col_label=cast(blocks.Label, X.columns[0])
932
+
X=X.rename(columns={col_label: "prompt"})
949
933
950
934
options= {
951
935
"temperature": temperature,
@@ -1181,7 +1165,7 @@ def predict(
1181
1165
1182
1166
Args:
1183
1167
X (bigframes.dataframe.DataFrame or bigframes.series.Series):
1184
-
Input DataFrame or Series, which contains only one column of prompts.
1168
+
Input DataFrame or Series, can contain one or more columns. If multiple columns are in the DataFrame, it must contain a "prompt" column for prediction.
1185
1169
Prompts can include preamble, questions, suggestions, instructions, or examples.
1186
1170
1187
1171
max_output_tokens (int, default 128):
@@ -1222,14 +1206,10 @@ def predict(
1222
1206
1223
1207
(X,) =utils.convert_to_dataframe(X)
1224
1208
1225
-
iflen(X.columns) !=1:
1226
-
raiseValueError(
1227
-
f"Only support one column as input. {constants.FEEDBACK_LINK}"
0 commit comments