@burtson-labs/bandit-engine 2.0.37 → 2.0.39
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/{aiProviderStore-UJRDUYOF.mjs → aiProviderStore-XN7GCBHJ.mjs} +2 -2
- package/dist/{chat-SZK3EBDO.mjs → chat-5QJNWB7I.mjs} +5 -5
- package/dist/chat-provider.js +29 -3
- package/dist/chat-provider.js.map +1 -1
- package/dist/chat-provider.mjs +4 -4
- package/dist/{chunk-2ZZA2IFL.mjs → chunk-3A2527TE.mjs} +3 -3
- package/dist/{chunk-FJO5ZWYU.mjs → chunk-CDQYBO3Q.mjs} +26 -8
- package/dist/chunk-CDQYBO3Q.mjs.map +1 -0
- package/dist/{chunk-PLNFTIGX.mjs → chunk-ECRNIAG6.mjs} +4 -4
- package/dist/{chunk-S635Q6OQ.mjs → chunk-EOKIE5HZ.mjs} +24 -3
- package/dist/chunk-EOKIE5HZ.mjs.map +1 -0
- package/dist/{chunk-G4OXOTNJ.mjs → chunk-JRCDANLN.mjs} +154 -61
- package/dist/{chunk-G4OXOTNJ.mjs.map → chunk-JRCDANLN.mjs.map} +1 -1
- package/dist/{chunk-ZNNOTDRD.mjs → chunk-QU5S5QQP.mjs} +9 -4
- package/dist/chunk-QU5S5QQP.mjs.map +1 -0
- package/dist/{chunk-ED5NNDKO.mjs → chunk-QYH2T4L5.mjs} +3 -3
- package/dist/{chunk-ZAVV2AT5.mjs → chunk-WO5KFNNW.mjs} +4 -4
- package/dist/cli/cli.js +2 -3
- package/dist/cli/cli.js.map +1 -1
- package/dist/{gateway-Ckf_KusF.d.ts → gateway-B0LJ3-jT.d.mts} +3 -0
- package/dist/{gateway-Ckf_KusF.d.mts → gateway-B0LJ3-jT.d.ts} +3 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +196 -59
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/management/management.js +196 -59
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +6 -6
- package/dist/modals/chat-modal/chat-modal.js +8 -3
- package/dist/modals/chat-modal/chat-modal.js.map +1 -1
- package/dist/modals/chat-modal/chat-modal.mjs +4 -4
- package/dist/public-types.d.mts +1 -1
- package/dist/public-types.d.ts +1 -1
- package/package.json +2 -3
- package/dist/chunk-FJO5ZWYU.mjs.map +0 -1
- package/dist/chunk-S635Q6OQ.mjs.map +0 -1
- package/dist/chunk-ZNNOTDRD.mjs.map +0 -1
- /package/dist/{aiProviderStore-UJRDUYOF.mjs.map → aiProviderStore-XN7GCBHJ.mjs.map} +0 -0
- /package/dist/{chat-SZK3EBDO.mjs.map → chat-5QJNWB7I.mjs.map} +0 -0
- /package/dist/{chunk-2ZZA2IFL.mjs.map → chunk-3A2527TE.mjs.map} +0 -0
- /package/dist/{chunk-PLNFTIGX.mjs.map → chunk-ECRNIAG6.mjs.map} +0 -0
- /package/dist/{chunk-ED5NNDKO.mjs.map → chunk-QYH2T4L5.mjs.map} +0 -0
- /package/dist/{chunk-ZAVV2AT5.mjs.map → chunk-WO5KFNNW.mjs.map} +0 -0
package/dist/chat-provider.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ChatProvider,
|
|
3
3
|
chat_provider_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3A2527TE.mjs";
|
|
5
5
|
import "./chunk-ONQMRE2G.mjs";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-EOKIE5HZ.mjs";
|
|
7
7
|
import "./chunk-RTQDQ6TC.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-CDQYBO3Q.mjs";
|
|
9
9
|
import "./chunk-XUBYA5I7.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-QU5S5QQP.mjs";
|
|
11
11
|
import "./chunk-KCI46M23.mjs";
|
|
12
12
|
import "./chunk-BJTO5JO5.mjs";
|
|
13
13
|
export {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-ONQMRE2G.mjs";
|
|
4
4
|
import {
|
|
5
5
|
aiProviderInitService
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EOKIE5HZ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useMCPToolsStore
|
|
9
9
|
} from "./chunk-RTQDQ6TC.mjs";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
useKnowledgeStore2,
|
|
21
21
|
useMemoryStore,
|
|
22
22
|
useProjectStore
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-CDQYBO3Q.mjs";
|
|
24
24
|
import {
|
|
25
25
|
indexedDBService_default,
|
|
26
26
|
useModelStore,
|
|
@@ -157,4 +157,4 @@ export {
|
|
|
157
157
|
ChatProvider,
|
|
158
158
|
chat_provider_default
|
|
159
159
|
};
|
|
160
|
-
//# sourceMappingURL=chunk-
|
|
160
|
+
//# sourceMappingURL=chunk-3A2527TE.mjs.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-XUBYA5I7.mjs";
|
|
6
6
|
import {
|
|
7
7
|
useAIProviderStore
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QU5S5QQP.mjs";
|
|
9
9
|
import {
|
|
10
10
|
debugLogger
|
|
11
11
|
} from "./chunk-KCI46M23.mjs";
|
|
@@ -2165,8 +2165,10 @@ Do not:
|
|
|
2165
2165
|
- Refer to yourself or use phrases like "As an AI..."
|
|
2166
2166
|
- Include greetings, explanations, or personality
|
|
2167
2167
|
- Include jokes, fiction, or quotes
|
|
2168
|
+
- Number, bullet, or otherwise prefix the questions with extra characters
|
|
2169
|
+
- Repeat the same idea phrased differently \u2014 each question must explore a distinct angle or subtopic
|
|
2168
2170
|
|
|
2169
|
-
Output only ${limit} questions \u2014 one per line.`;
|
|
2171
|
+
Output only ${limit} questions \u2014 one per line, with no leading numbers, bullets, or prefixes.`;
|
|
2170
2172
|
return prompt.trim();
|
|
2171
2173
|
};
|
|
2172
2174
|
|
|
@@ -2215,17 +2217,33 @@ var generateConversationStarters = async (args) => {
|
|
|
2215
2217
|
options: { temperature: 1.5, num_predict: 250 }
|
|
2216
2218
|
});
|
|
2217
2219
|
const questions$ = data$.pipe(map((d) => {
|
|
2218
|
-
const
|
|
2219
|
-
|
|
2220
|
+
const sanitizeLine = (line) => {
|
|
2221
|
+
const withoutNumbering = line.replace(/^[0-9]+[.)\-\s:]+/, "").replace(/^[•*+-]\s+/, "");
|
|
2222
|
+
const withoutQuotes = withoutNumbering.replace(/^[“"']+/, "").replace(/[”"']+$/, "");
|
|
2223
|
+
const withoutEmoji = withoutQuotes.replace(/\p{Extended_Pictographic}/gu, "");
|
|
2224
|
+
return withoutEmoji.trim().replace(/\s+/g, " ");
|
|
2225
|
+
};
|
|
2226
|
+
const sanitized = d.response.split("\n").map((line) => sanitizeLine(line.trim())).filter((line) => {
|
|
2227
|
+
const lower = line.toLowerCase();
|
|
2228
|
+
return line.length > 10 && line.includes("?") && !lower.includes("sorry") && !lower.includes("i cannot") && !lower.includes("i can't") && !lower.includes("unable to") && !lower.startsWith("as an ai");
|
|
2229
|
+
}).filter((line) => line.length > 0);
|
|
2230
|
+
const unique = [];
|
|
2231
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2232
|
+
sanitized.forEach((line) => {
|
|
2233
|
+
const key = line.toLowerCase().replace(/[^\p{L}\p{N}]+/gu, " ").trim();
|
|
2234
|
+
if (key && !seen.has(key)) {
|
|
2235
|
+
seen.add(key);
|
|
2236
|
+
unique.push(line);
|
|
2237
|
+
}
|
|
2220
2238
|
});
|
|
2221
|
-
return
|
|
2239
|
+
return unique;
|
|
2222
2240
|
}));
|
|
2223
2241
|
const starters = await lastValueFrom(questions$);
|
|
2224
2242
|
if (starters.length === 0) {
|
|
2225
2243
|
debugLogger.warn("No meaningful conversation starters generated");
|
|
2226
2244
|
return [];
|
|
2227
2245
|
}
|
|
2228
|
-
return starters;
|
|
2246
|
+
return starters.slice(0, args.limit);
|
|
2229
2247
|
} catch (err) {
|
|
2230
2248
|
debugLogger.error("\u274C Failed to generate conversation starters:", { error: err });
|
|
2231
2249
|
notificationService.handleHttpError(err);
|
|
@@ -4634,7 +4652,7 @@ var useVectorStore = () => {
|
|
|
4634
4652
|
const [hasCompatibleProvider, setHasCompatibleProvider] = useState2(false);
|
|
4635
4653
|
const checkProviderCompatibility = useCallback2(async () => {
|
|
4636
4654
|
try {
|
|
4637
|
-
const { useAIProviderStore: useAIProviderStore2 } = await import("./aiProviderStore-
|
|
4655
|
+
const { useAIProviderStore: useAIProviderStore2 } = await import("./aiProviderStore-XN7GCBHJ.mjs");
|
|
4638
4656
|
const aiProviderState = useAIProviderStore2.getState();
|
|
4639
4657
|
const provider = aiProviderState.provider;
|
|
4640
4658
|
const config = aiProviderState.config;
|
|
@@ -5676,4 +5694,4 @@ export {
|
|
|
5676
5694
|
useNotification,
|
|
5677
5695
|
NotificationProvider
|
|
5678
5696
|
};
|
|
5679
|
-
//# sourceMappingURL=chunk-
|
|
5697
|
+
//# sourceMappingURL=chunk-CDQYBO3Q.mjs.map
|