nodebb-plugin-search-agent 0.0.8 → 0.0.9

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.
@@ -24,12 +24,12 @@ async function getSettings() {
24
24
  const raw = (await meta.settings.get('search-agent')) || {};
25
25
  return {
26
26
  topicLimit: Math.max(50, parseInt(raw.topicLimit, 10) || 500),
27
- maxResults: Math.min(20, Math.max(1, parseInt(raw.maxResults, 10) || 10)),
27
+ maxResults: Math.min(50, Math.max(1, parseInt(raw.maxResults, 10) || 10)),
28
28
  aiEnabled: raw.aiEnabled === 'on',
29
29
  openaiApiKey: (raw.openaiApiKey || '').trim(),
30
30
  openaiModel: (raw.openaiModel || 'gpt-4o-mini').trim(),
31
31
  // How many TF-IDF candidates to send to AI for re-ranking
32
- aiCandidates: Math.min(30, Math.max(5, parseInt(raw.aiCandidates, 10) || 20)),
32
+ aiCandidates: Math.min(100, Math.max(5, parseInt(raw.aiCandidates, 10) || 30)),
33
33
  // Visibility: 'all' = all logged-in users, 'admins' = administrators only
34
34
  visibleTo: raw.visibleTo || 'all',
35
35
  // Whether guests (non-logged-in users) may use the widget
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-search-agent",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "NodeBB plugin that adds a floating chat assistant to help users find relevant forum topics using TF-IDF text similarity",
5
5
  "main": "library.js",
6
6
  "author": "Racheli Bayfus",
@@ -9,7 +9,7 @@ function winston() {
9
9
  }
10
10
 
11
11
  // Fetch this many candidates from Orama — cast a wide net so the AI has enough to choose from
12
- const TOP_K = 20;
12
+ const TOP_K = 50;
13
13
  // Absolute minimum cosine similarity — only filters pure noise (near-zero similarity).
14
14
  // Do NOT raise this: the relevant result often scores lower than irrelevant ones.
15
15
  // The AI re-ranker (which reads content) is the precision gate, not this floor.