@burtson-labs/bandit-engine 2.0.52 → 2.0.53
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-3N3VE6D4.mjs → aiProviderStore-337QNQB3.mjs} +2 -2
- package/dist/{chat-YWYLVKXX.mjs → chat-U4SE4JQK.mjs} +6 -6
- package/dist/chat-provider.js +17 -9
- package/dist/chat-provider.js.map +1 -1
- package/dist/chat-provider.mjs +4 -4
- package/dist/{chunk-RSSJADDD.mjs → chunk-2BGORTWS.mjs} +4 -4
- package/dist/{chunk-QX6CO7TJ.mjs → chunk-557E5VZ2.mjs} +3 -3
- package/dist/{chunk-MH7WFWCP.mjs → chunk-AVV7HDGR.mjs} +3 -3
- package/dist/{chunk-YZ2HJFPQ.mjs → chunk-EULV5CHD.mjs} +2 -2
- package/dist/{chunk-TSQCNHOX.mjs → chunk-GNE4TTSI.mjs} +48 -15
- package/dist/chunk-GNE4TTSI.mjs.map +1 -0
- package/dist/{chunk-BENL3EF2.mjs → chunk-H3BYFEIE.mjs} +18 -10
- package/dist/chunk-H3BYFEIE.mjs.map +1 -0
- package/dist/{chunk-M3BEAMCC.mjs → chunk-NZKLKZJT.mjs} +3 -3
- package/dist/{chunk-Y5N3NSTU.mjs → chunk-O54PTFJM.mjs} +8 -8
- package/dist/{chunk-37PEP5JK.mjs → chunk-UFSEYVRS.mjs} +3 -3
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/{gateway-oScD5tvE.d.mts → gateway-C5T5FfCy.d.mts} +32 -0
- package/dist/{gateway-oScD5tvE.d.ts → gateway-C5T5FfCy.d.ts} +32 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +60 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/management/management.js +60 -19
- package/dist/management/management.js.map +1 -1
- package/dist/management/management.mjs +7 -7
- package/dist/modals/chat-modal/chat-modal.js +17 -9
- 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 +1 -1
- package/dist/chunk-BENL3EF2.mjs.map +0 -1
- package/dist/chunk-TSQCNHOX.mjs.map +0 -1
- /package/dist/{aiProviderStore-3N3VE6D4.mjs.map → aiProviderStore-337QNQB3.mjs.map} +0 -0
- /package/dist/{chat-YWYLVKXX.mjs.map → chat-U4SE4JQK.mjs.map} +0 -0
- /package/dist/{chunk-RSSJADDD.mjs.map → chunk-2BGORTWS.mjs.map} +0 -0
- /package/dist/{chunk-QX6CO7TJ.mjs.map → chunk-557E5VZ2.mjs.map} +0 -0
- /package/dist/{chunk-MH7WFWCP.mjs.map → chunk-AVV7HDGR.mjs.map} +0 -0
- /package/dist/{chunk-YZ2HJFPQ.mjs.map → chunk-EULV5CHD.mjs.map} +0 -0
- /package/dist/{chunk-M3BEAMCC.mjs.map → chunk-NZKLKZJT.mjs.map} +0 -0
- /package/dist/{chunk-Y5N3NSTU.mjs.map → chunk-O54PTFJM.mjs.map} +0 -0
- /package/dist/{chunk-37PEP5JK.mjs.map → chunk-UFSEYVRS.mjs.map} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
management_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-O54PTFJM.mjs";
|
|
4
|
+
import "../chunk-EULV5CHD.mjs";
|
|
5
|
+
import "../chunk-UFSEYVRS.mjs";
|
|
6
6
|
import "../chunk-EHNWQ4T3.mjs";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-2BGORTWS.mjs";
|
|
8
|
+
import "../chunk-NZKLKZJT.mjs";
|
|
9
|
+
import "../chunk-557E5VZ2.mjs";
|
|
10
10
|
import "../chunk-7ZDS33S2.mjs";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-H3BYFEIE.mjs";
|
|
12
12
|
import "../chunk-KCI46M23.mjs";
|
|
13
13
|
import "../chunk-BJTO5JO5.mjs";
|
|
14
14
|
export {
|
|
@@ -1603,7 +1603,8 @@ var init_gateway_service = __esm({
|
|
|
1603
1603
|
index: 0,
|
|
1604
1604
|
delta: {
|
|
1605
1605
|
role: parsed.message.role,
|
|
1606
|
-
content: parsed.message.content
|
|
1606
|
+
content: parsed.message.content,
|
|
1607
|
+
tool_calls: parsed.message.tool_calls
|
|
1607
1608
|
},
|
|
1608
1609
|
finish_reason: parsed.done ? parsed.done_reason || "stop" : null
|
|
1609
1610
|
}]
|
|
@@ -2583,6 +2584,7 @@ var init_gateway_provider = __esm({
|
|
|
2583
2584
|
}
|
|
2584
2585
|
}
|
|
2585
2586
|
}
|
|
2587
|
+
const toolAwareRequest = request;
|
|
2586
2588
|
const gatewayRequest = {
|
|
2587
2589
|
model: request.model,
|
|
2588
2590
|
messages,
|
|
@@ -2591,7 +2593,8 @@ var init_gateway_provider = __esm({
|
|
|
2591
2593
|
max_tokens: request.maxTokens,
|
|
2592
2594
|
provider: this.config.provider,
|
|
2593
2595
|
// Only include top-level images for Ollama (fallback)
|
|
2594
|
-
images: this.config.provider === "ollama" ? request.images : void 0
|
|
2596
|
+
images: this.config.provider === "ollama" ? request.images : void 0,
|
|
2597
|
+
tools: toolAwareRequest.tools?.length ? toolAwareRequest.tools : void 0
|
|
2595
2598
|
};
|
|
2596
2599
|
debugLogger.debug("Gateway provider chat request", {
|
|
2597
2600
|
model: request.model,
|
|
@@ -2608,13 +2611,18 @@ var init_gateway_provider = __esm({
|
|
|
2608
2611
|
}))
|
|
2609
2612
|
});
|
|
2610
2613
|
return this.gatewayService.chat(gatewayRequest).pipe(
|
|
2611
|
-
(0, import_rxjs7.map)((response) =>
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2614
|
+
(0, import_rxjs7.map)((response) => {
|
|
2615
|
+
const choice = response.choices?.[0];
|
|
2616
|
+
const toolCalls = choice?.message?.tool_calls ?? choice?.delta?.tool_calls;
|
|
2617
|
+
return {
|
|
2618
|
+
message: {
|
|
2619
|
+
content: choice?.message?.content ?? choice?.delta?.content ?? "",
|
|
2620
|
+
role: "assistant",
|
|
2621
|
+
tool_calls: toolCalls
|
|
2622
|
+
},
|
|
2623
|
+
done: choice?.finish_reason === "stop" || choice?.finish_reason === "length" || choice?.finish_reason === "tool_calls"
|
|
2624
|
+
};
|
|
2625
|
+
})
|
|
2618
2626
|
);
|
|
2619
2627
|
}
|
|
2620
2628
|
generate(request) {
|