Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

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 af55904 commit 7def116
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 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 7def116

Please sign in to comment.