@copilotkit/runtime 1.4.2-tyler-reset-chat.2 → 1.4.2-tyler-reset-chat.3
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/CHANGELOG.md +10 -0
- package/dist/{chunk-LQRRU6LE.mjs → chunk-2JBFINZX.mjs} +3 -3
- package/dist/{chunk-LQRRU6LE.mjs.map → chunk-2JBFINZX.mjs.map} +1 -1
- package/dist/{chunk-OKQVDDJ2.mjs → chunk-3FNXXTKZ.mjs} +10 -7
- package/dist/chunk-3FNXXTKZ.mjs.map +1 -0
- package/dist/{chunk-3GHAUJSO.mjs → chunk-AMM4RWXE.mjs} +2 -2
- package/dist/{chunk-FMXSCJME.mjs → chunk-NZDL35TB.mjs} +2 -2
- package/dist/{chunk-PT6VQ5GO.mjs → chunk-RPHJLJL3.mjs} +2 -2
- package/dist/index.js +10 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/lib/index.js +10 -7
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +5 -5
- package/dist/lib/integrations/index.js +1 -1
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +5 -5
- package/dist/lib/integrations/nest/index.js +1 -1
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +3 -3
- package/dist/lib/integrations/node-express/index.js +1 -1
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +3 -3
- package/dist/lib/integrations/node-http/index.js +1 -1
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +2 -2
- package/dist/service-adapters/index.js +9 -6
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +1 -1
- package/package.json +4 -4
- package/src/service-adapters/langchain/utils.ts +8 -5
- package/dist/chunk-OKQVDDJ2.mjs.map +0 -1
- /package/dist/{chunk-3GHAUJSO.mjs.map → chunk-AMM4RWXE.mjs.map} +0 -0
- /package/dist/{chunk-FMXSCJME.mjs.map → chunk-NZDL35TB.mjs.map} +0 -0
- /package/dist/{chunk-PT6VQ5GO.mjs.map → chunk-RPHJLJL3.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
config,
|
|
4
4
|
copilotRuntimeNextJSAppRouterEndpoint,
|
|
5
5
|
copilotRuntimeNextJSPagesRouterEndpoint
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AMM4RWXE.mjs";
|
|
7
7
|
import {
|
|
8
8
|
copilotRuntimeNestEndpoint
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RPHJLJL3.mjs";
|
|
10
10
|
import {
|
|
11
11
|
copilotRuntimeNodeExpressEndpoint
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NZDL35TB.mjs";
|
|
13
13
|
import {
|
|
14
14
|
CopilotRuntime,
|
|
15
15
|
buildSchema,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
getCommonConfig,
|
|
21
21
|
langGraphPlatformEndpoint,
|
|
22
22
|
resolveEndpointType
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-2JBFINZX.mjs";
|
|
24
24
|
import {
|
|
25
25
|
AnthropicAdapter,
|
|
26
26
|
GoogleGenerativeAIAdapter,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
OpenAIAssistantAdapter,
|
|
31
31
|
RemoteChain,
|
|
32
32
|
UnifyAdapter
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-3FNXXTKZ.mjs";
|
|
34
34
|
import {
|
|
35
35
|
GuardrailsValidationFailureResponse,
|
|
36
36
|
MessageStreamInterruptedResponse,
|
package/dist/lib/index.js
CHANGED
|
@@ -44,7 +44,7 @@ var require_package = __commonJS({
|
|
|
44
44
|
publishConfig: {
|
|
45
45
|
access: "public"
|
|
46
46
|
},
|
|
47
|
-
version: "1.4.2-tyler-reset-chat.
|
|
47
|
+
version: "1.4.2-tyler-reset-chat.3",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -570,9 +570,12 @@ async function streamLangChainResponse({ result, eventStream$, actionExecution }
|
|
|
570
570
|
let toolCallId = void 0;
|
|
571
571
|
let toolCallArgs = void 0;
|
|
572
572
|
let hasToolCall = false;
|
|
573
|
-
let content =
|
|
573
|
+
let content = "";
|
|
574
|
+
if (value && value.content) {
|
|
575
|
+
content = Array.isArray(value.content) ? ((_d = value.content[0]) == null ? void 0 : _d.text) ?? "" : value.content;
|
|
576
|
+
}
|
|
574
577
|
if (isAIMessageChunk(value)) {
|
|
575
|
-
let chunk = (
|
|
578
|
+
let chunk = (_e = value.tool_call_chunks) == null ? void 0 : _e[0];
|
|
576
579
|
toolCallArgs = chunk == null ? void 0 : chunk.args;
|
|
577
580
|
hasToolCall = chunk != void 0;
|
|
578
581
|
if (chunk == null ? void 0 : chunk.name)
|
|
@@ -587,10 +590,10 @@ async function streamLangChainResponse({ result, eventStream$, actionExecution }
|
|
|
587
590
|
toolCallName = toolCallDetails.name;
|
|
588
591
|
toolCallId = toolCallDetails.id;
|
|
589
592
|
} else if (isBaseMessageChunk(value)) {
|
|
590
|
-
let chunk = (
|
|
591
|
-
toolCallName = (
|
|
593
|
+
let chunk = (_g = (_f = value.additional_kwargs) == null ? void 0 : _f.tool_calls) == null ? void 0 : _g[0];
|
|
594
|
+
toolCallName = (_h = chunk == null ? void 0 : chunk.function) == null ? void 0 : _h.name;
|
|
592
595
|
toolCallId = chunk == null ? void 0 : chunk.id;
|
|
593
|
-
toolCallArgs = (
|
|
596
|
+
toolCallArgs = (_i = chunk == null ? void 0 : chunk.function) == null ? void 0 : _i.arguments;
|
|
594
597
|
hasToolCall = (chunk == null ? void 0 : chunk.function) != void 0;
|
|
595
598
|
}
|
|
596
599
|
if (mode === "message" && (toolCallId || done)) {
|
|
@@ -613,7 +616,7 @@ async function streamLangChainResponse({ result, eventStream$, actionExecution }
|
|
|
613
616
|
}
|
|
614
617
|
}
|
|
615
618
|
if (mode === "message" && content) {
|
|
616
|
-
eventStream$.sendTextMessageContent(
|
|
619
|
+
eventStream$.sendTextMessageContent(content);
|
|
617
620
|
} else if (mode === "function" && toolCallArgs) {
|
|
618
621
|
if (toolCallDetails.index !== toolCallDetails.prevIndex) {
|
|
619
622
|
eventStream$.sendActionExecutionEnd();
|