Skip to content

Commit

Permalink
fix: Param "scoreThreshold" should be "score_threshold" (#234)
Browse files Browse the repository at this point in the history
Sine 18 Oct 2018, I found that the scoreThreshold param won't work and encounter  "Error: 3 INVALID_ARGUMENT: Request contains an invalid argument." during prediction call. I compared the doc below and the params should be score_threshold instead of scoreThreshold. 

https://cloud.google.com/vision/automl/docs/reference/rest/v1beta1/projects.locations.models/predict#request-body
  • Loading branch information
normankong authored and JustinBeckwith committed Nov 26, 2018
1 parent b876b17 commit d1056e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vision/samples/automl/automlVisionPredict.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async function predict(
const params = {};

if (scoreThreshold) {
params.scoreThreshold = scoreThreshold;
params.score_threshold = scoreThreshold;
}

// Set the payload by giving the content and type of the file.
Expand Down

0 comments on commit d1056e3

Please sign in to comment.