@fsvreddit/bot-bouncer-evaluation 0.7.44 → 0.7.45

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.
@@ -95,7 +95,7 @@ class EvaluateRepostBot extends UserEvaluatorBase_js_1.UserEvaluatorBase {
95
95
  },
96
96
  });
97
97
  const result = JSON.parse(response.output_text);
98
- await redis.set(cacheKey, result.similarity.toString(), { expiration: (0, date_fns_1.addHours)(new Date(), 1) });
98
+ await redis.set(cacheKey, result.similarity.toString(), { expiration: (0, date_fns_1.addWeeks)(new Date(), 1) });
99
99
  console.log(`Repost Checks: Tokens used: ${response.usage?.total_tokens}, Similarity between ${this.postIdToUrl(postA.id)} and ${this.postIdToUrl(postB.id)}: ${result.similarity}`);
100
100
  return result.similarity;
101
101
  }
@@ -122,7 +122,7 @@ class EvaluateTextInNsfwImages extends EvaluateBotGroupAdvanced_1.EvaluateBotGro
122
122
  }
123
123
  const result = JSON.parse(response.output_text);
124
124
  console.log(`OpenAI Checks: Tokens used: ${response.usage?.total_tokens}, Model: ${model}, Image URL: ${url}, Extracted Text: ${result.extractedText}`);
125
- await redis.set(resultCacheKey, JSON.stringify(result.extractedText), { expiration: (0, date_fns_1.addHours)(new Date(), 1) });
125
+ await redis.set(resultCacheKey, JSON.stringify(result.extractedText), { expiration: (0, date_fns_1.addWeeks)(new Date(), 1) });
126
126
  if (!result.extractedText) {
127
127
  return;
128
128
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fsvreddit/bot-bouncer-evaluation",
3
- "version": "0.7.44",
3
+ "version": "0.7.45",
4
4
  "description": "Evaluation code for Bot Bouncer, a Dev Platform app designed to hunt bots on Reddit",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {