Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnalyzeComment object not working? #175

Open
corbolt opened this issue Jun 22, 2021 · 0 comments
Open

AnalyzeComment object not working? #175

corbolt opened this issue Jun 22, 2021 · 0 comments

Comments

@corbolt
Copy link

corbolt commented Jun 22, 2021

Hi,

I tried to call analyze() with an AnalyzeComment object instead of the variant analyze(text, { options }).

The request looked like this:

analyze({ comment: { text }, languages: ['en'], requestedAttributes: { 'TOXICITY': { scoreThreshold: 0.6 }, 'IDENTITY_ATTACK': { scoreThreshold: 0.6 }, 'INSULT': { scoreThreshold: 0.7 } } });

Here I don't get a complete response from the API:

What I get as a response is the following:

{ languages: [ 'en' ], detectedLanguages: [ 'ro', 'en' ] }

The attributeScores are missing here. What am I doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant