@copilotkit/runtime 1.0.4 → 1.0.6
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/.turbo/turbo-build.log +44 -44
- package/CHANGELOG.md +17 -0
- package/dist/{chunk-JWUHY4RB.mjs → chunk-A2K4XX7Q.mjs} +2 -2
- package/dist/{chunk-F7DCXPQ7.mjs → chunk-FI5ULODX.mjs} +2 -2
- package/dist/{chunk-67DNPQCA.mjs → chunk-JA2IRWRL.mjs} +2 -9
- package/dist/chunk-JA2IRWRL.mjs.map +1 -0
- package/dist/{chunk-UFAHXJX7.mjs → chunk-KZ4CQTGH.mjs} +3 -3
- package/dist/{chunk-FNDYTEEL.mjs → chunk-XXDXWPU2.mjs} +2 -2
- package/dist/{chunk-VQM4RIMQ.mjs → chunk-ZA7P76V6.mjs} +2 -4
- package/dist/chunk-ZA7P76V6.mjs.map +1 -0
- package/dist/index.js +2 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/lib/index.js +2 -11
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +6 -6
- package/dist/lib/integrations/index.js +1 -3
- 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 -3
- 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 -3
- 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 -3
- 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 +1 -8
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +1 -1
- package/package.json +4 -6
- package/src/service-adapters/openai/utils.ts +1 -8
- package/dist/chunk-67DNPQCA.mjs.map +0 -1
- package/dist/chunk-VQM4RIMQ.mjs.map +0 -1
- /package/dist/{chunk-JWUHY4RB.mjs.map → chunk-A2K4XX7Q.mjs.map} +0 -0
- /package/dist/{chunk-F7DCXPQ7.mjs.map → chunk-FI5ULODX.mjs.map} +0 -0
- /package/dist/{chunk-UFAHXJX7.mjs.map → chunk-KZ4CQTGH.mjs.map} +0 -0
- /package/dist/{chunk-FNDYTEEL.mjs.map → chunk-XXDXWPU2.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CopilotRuntime,
|
|
3
3
|
flattenToolCallsNoDuplicates
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KZ4CQTGH.mjs";
|
|
5
5
|
import {
|
|
6
6
|
GoogleGenerativeAIAdapter,
|
|
7
7
|
LangChainAdapter,
|
|
8
8
|
OpenAIAdapter,
|
|
9
9
|
OpenAIAssistantAdapter
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JA2IRWRL.mjs";
|
|
11
11
|
import {
|
|
12
12
|
config,
|
|
13
13
|
copilotRuntimeNextJSAppRouterEndpoint,
|
|
14
14
|
copilotRuntimeNextJSPagesRouterEndpoint
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-A2K4XX7Q.mjs";
|
|
16
16
|
import {
|
|
17
17
|
copilotRuntimeNestEndpoint
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-XXDXWPU2.mjs";
|
|
19
19
|
import {
|
|
20
20
|
copilotRuntimeNodeExpressEndpoint
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-FI5ULODX.mjs";
|
|
22
22
|
import {
|
|
23
23
|
buildSchema,
|
|
24
24
|
copilotRuntimeNodeHttpEndpoint,
|
|
25
25
|
createContext,
|
|
26
26
|
getCommonConfig
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-ZA7P76V6.mjs";
|
|
28
28
|
import "./chunk-URMISMK2.mjs";
|
|
29
29
|
import {
|
|
30
30
|
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.0.
|
|
47
|
+
version: "1.0.6",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -90,14 +90,12 @@ var require_package = __commonJS({
|
|
|
90
90
|
"graphql-scalars": "^1.23.0",
|
|
91
91
|
"graphql-yoga": "^5.3.1",
|
|
92
92
|
"groq-sdk": "^0.5.0",
|
|
93
|
-
"js-tiktoken": "^1.0.8",
|
|
94
93
|
langchain: "^0.1.36",
|
|
95
94
|
openai: "^4.50.0",
|
|
96
95
|
pino: "^9.2.0",
|
|
97
96
|
"pino-pretty": "^11.2.1",
|
|
98
97
|
"reflect-metadata": "^0.2.2",
|
|
99
98
|
rxjs: "^7.8.1",
|
|
100
|
-
tiktoken: "^1.0.15",
|
|
101
99
|
"type-graphql": "2.0.0-rc.1",
|
|
102
100
|
zod: "^3.23.3"
|
|
103
101
|
},
|
|
@@ -199,7 +197,6 @@ var ResultMessage = class extends BaseMessage {
|
|
|
199
197
|
__name(ResultMessage, "ResultMessage");
|
|
200
198
|
|
|
201
199
|
// src/service-adapters/openai/utils.ts
|
|
202
|
-
var import_js_tiktoken = require("js-tiktoken");
|
|
203
200
|
function limitMessagesToTokenCount(messages, tools, model, maxTokens) {
|
|
204
201
|
maxTokens || (maxTokens = maxTokensForOpenAIModel(model));
|
|
205
202
|
const result = [];
|
|
@@ -284,13 +281,7 @@ function countMessageTokens(model, message) {
|
|
|
284
281
|
}
|
|
285
282
|
__name(countMessageTokens, "countMessageTokens");
|
|
286
283
|
function countTokens(model, text) {
|
|
287
|
-
|
|
288
|
-
try {
|
|
289
|
-
enc = (0, import_js_tiktoken.encodingForModel)(model);
|
|
290
|
-
} catch (e) {
|
|
291
|
-
enc = (0, import_js_tiktoken.encodingForModel)("gpt-4");
|
|
292
|
-
}
|
|
293
|
-
return enc.encode(text).length;
|
|
284
|
+
return text.length / 3;
|
|
294
285
|
}
|
|
295
286
|
__name(countTokens, "countTokens");
|
|
296
287
|
function convertActionInputToOpenAITool(action) {
|