@joliegg/moderation 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -29,7 +29,7 @@ declare class ModerationClient {
29
29
  * Returns a list of moderation categories detected on an image
30
30
  *
31
31
  * @param {string} url
32
- * @param {number} [minimumConfidence = 95] The minimum confidence required for a category to be considered
32
+ * @param {number} [minimumConfidence = 50] The minimum confidence required for a category to be considered
33
33
  *
34
34
  *
35
35
  * @returns {Promise<ModerationResult[]>} The list of results that were detected with the minimum confidence specified
package/dist/index.js CHANGED
@@ -88,12 +88,12 @@ class ModerationClient {
88
88
  * Returns a list of moderation categories detected on an image
89
89
  *
90
90
  * @param {string} url
91
- * @param {number} [minimumConfidence = 95] The minimum confidence required for a category to be considered
91
+ * @param {number} [minimumConfidence = 50] The minimum confidence required for a category to be considered
92
92
  *
93
93
  *
94
94
  * @returns {Promise<ModerationResult[]>} The list of results that were detected with the minimum confidence specified
95
95
  */
96
- async moderateImage(url, minimumConfidence = 95) {
96
+ async moderateImage(url, minimumConfidence = 50) {
97
97
  if (typeof this.rekognitionClient === 'undefined') {
98
98
  return { source: url, moderation: [] };
99
99
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joliegg/moderation",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "A set of tools for chat moderation",
5
5
  "author": "Diana Islas Ocampo",
6
6
  "main": "dist/index.js",
package/src/index.ts CHANGED
@@ -111,12 +111,12 @@ class ModerationClient {
111
111
  * Returns a list of moderation categories detected on an image
112
112
  *
113
113
  * @param {string} url
114
- * @param {number} [minimumConfidence = 95] The minimum confidence required for a category to be considered
114
+ * @param {number} [minimumConfidence = 50] The minimum confidence required for a category to be considered
115
115
  *
116
116
  *
117
117
  * @returns {Promise<ModerationResult[]>} The list of results that were detected with the minimum confidence specified
118
118
  */
119
- async moderateImage (url: string, minimumConfidence: number = 95): Promise<ModerationResult> {
119
+ async moderateImage (url: string, minimumConfidence: number = 50): Promise<ModerationResult> {
120
120
  if (typeof this.rekognitionClient === 'undefined') {
121
121
  return { source: url, moderation: [] };
122
122
  }