Open corbolt opened 3 years ago
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?
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?