You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the language is not automatically detected the perspective-api-client will throw the error: response error unable to detect language
The easiest workaround to this issue would be making sure to add a default option as suggested by the official documentation. I'd propose adding this following code example to the readme const result = await perspective.analyze({ comment: { text }, languages: ["en"], })
The text was updated successfully, but these errors were encountered:
There also needs to be something in getAnalyzeCommentPayload to the effect of if (opts.languages) resource.languages = opts.languages; I created a branch, but there are not push permissions aside from @sloria
When the language is not automatically detected the perspective-api-client will throw the error:
response error unable to detect language
The easiest workaround to this issue would be making sure to add a default option as suggested by the official documentation. I'd propose adding this following code example to the readme
const result = await perspective.analyze({ comment: { text }, languages: ["en"], })
The text was updated successfully, but these errors were encountered: