@copilotkit/runtime 1.3.15 → 1.3.16-mme-improve-langsmith.0
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 +8 -0
- package/dist/{chunk-R3IJK6GR.mjs → chunk-E75MOZGE.mjs} +2 -2
- package/dist/{chunk-CUN5GXCO.mjs → chunk-KCW3B5UA.mjs} +3 -3
- package/dist/{chunk-WYB2Z6SM.mjs → chunk-QJB3CIHI.mjs} +2 -2
- package/dist/{chunk-3RAQGSAI.mjs → chunk-TD3UMHBH.mjs} +2 -2
- package/dist/chunk-TD3UMHBH.mjs.map +1 -0
- package/dist/{chunk-NMV7A7VP.mjs → chunk-UHFZPBA5.mjs} +10 -5
- package/dist/chunk-UHFZPBA5.mjs.map +1 -0
- package/dist/{chunk-FH4SPOAG.mjs → chunk-YGFQK4XG.mjs} +2 -2
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/lib/index.js +10 -5
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +6 -6
- package/dist/lib/integrations/index.js +1 -1
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +4 -4
- 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 +2 -2
- 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 +2 -2
- 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 +1 -1
- package/dist/service-adapters/index.js +9 -4
- 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/google/google-genai-adapter.ts +2 -2
- package/src/service-adapters/langchain/langchain-adapter.ts +3 -2
- package/dist/chunk-3RAQGSAI.mjs.map +0 -1
- package/dist/chunk-NMV7A7VP.mjs.map +0 -1
- /package/dist/{chunk-R3IJK6GR.mjs.map → chunk-E75MOZGE.mjs.map} +0 -0
- /package/dist/{chunk-CUN5GXCO.mjs.map → chunk-KCW3B5UA.mjs.map} +0 -0
- /package/dist/{chunk-WYB2Z6SM.mjs.map → chunk-QJB3CIHI.mjs.map} +0 -0
- /package/dist/{chunk-FH4SPOAG.mjs.map → chunk-YGFQK4XG.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotRuntime,
|
|
3
3
|
flattenToolCallsNoDuplicates
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KCW3B5UA.mjs";
|
|
5
5
|
import {
|
|
6
6
|
AnthropicAdapter,
|
|
7
7
|
GoogleGenerativeAIAdapter,
|
|
@@ -11,24 +11,24 @@ import {
|
|
|
11
11
|
OpenAIAssistantAdapter,
|
|
12
12
|
RemoteChain,
|
|
13
13
|
UnifyAdapter
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UHFZPBA5.mjs";
|
|
15
15
|
import {
|
|
16
16
|
config,
|
|
17
17
|
copilotRuntimeNextJSAppRouterEndpoint,
|
|
18
18
|
copilotRuntimeNextJSPagesRouterEndpoint
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QJB3CIHI.mjs";
|
|
20
20
|
import {
|
|
21
21
|
copilotRuntimeNestEndpoint
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-YGFQK4XG.mjs";
|
|
23
23
|
import {
|
|
24
24
|
copilotRuntimeNodeExpressEndpoint
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-E75MOZGE.mjs";
|
|
26
26
|
import {
|
|
27
27
|
buildSchema,
|
|
28
28
|
copilotRuntimeNodeHttpEndpoint,
|
|
29
29
|
createContext,
|
|
30
30
|
getCommonConfig
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-TD3UMHBH.mjs";
|
|
32
32
|
import "./chunk-MXXPWWBF.mjs";
|
|
33
33
|
import {
|
|
34
34
|
GuardrailsValidationFailureResponse,
|
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.3.
|
|
47
|
+
version: "1.3.16-mme-improve-langsmith.0",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -677,7 +677,8 @@ var LangChainAdapter = class {
|
|
|
677
677
|
this.options = options;
|
|
678
678
|
}
|
|
679
679
|
async process(request) {
|
|
680
|
-
const { eventSource, model, actions, messages,
|
|
680
|
+
const { eventSource, model, actions, messages, runId } = request;
|
|
681
|
+
const threadId = request.threadId ?? (0, import_shared3.randomId)();
|
|
681
682
|
const result = await this.options.chainFn({
|
|
682
683
|
messages: messages.map(convertMessageToLangChainMessage),
|
|
683
684
|
tools: actions.map(convertActionInputToLangChainTool),
|
|
@@ -692,7 +693,7 @@ var LangChainAdapter = class {
|
|
|
692
693
|
});
|
|
693
694
|
});
|
|
694
695
|
return {
|
|
695
|
-
threadId
|
|
696
|
+
threadId
|
|
696
697
|
};
|
|
697
698
|
}
|
|
698
699
|
};
|
|
@@ -703,12 +704,16 @@ var import_google_gauth = require("@langchain/google-gauth");
|
|
|
703
704
|
var GoogleGenerativeAIAdapter = class extends LangChainAdapter {
|
|
704
705
|
constructor(options) {
|
|
705
706
|
super({
|
|
706
|
-
chainFn: async ({ messages, tools }) => {
|
|
707
|
+
chainFn: async ({ messages, tools, threadId }) => {
|
|
707
708
|
const model = new import_google_gauth.ChatGoogle({
|
|
708
709
|
modelName: (options == null ? void 0 : options.model) ?? "gemini-1.5-pro",
|
|
709
710
|
apiVersion: "v1beta"
|
|
710
711
|
}).bindTools(tools);
|
|
711
|
-
return model.stream(messages
|
|
712
|
+
return model.stream(messages, {
|
|
713
|
+
metadata: {
|
|
714
|
+
conversation_id: threadId
|
|
715
|
+
}
|
|
716
|
+
});
|
|
712
717
|
}
|
|
713
718
|
});
|
|
714
719
|
}
|