@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.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
|
},
|
|
@@ -203,7 +201,6 @@ var ResultMessage = class extends BaseMessage {
|
|
|
203
201
|
__name(ResultMessage, "ResultMessage");
|
|
204
202
|
|
|
205
203
|
// src/service-adapters/openai/utils.ts
|
|
206
|
-
var import_js_tiktoken = require("js-tiktoken");
|
|
207
204
|
function limitMessagesToTokenCount(messages, tools, model, maxTokens) {
|
|
208
205
|
maxTokens || (maxTokens = maxTokensForOpenAIModel(model));
|
|
209
206
|
const result = [];
|
|
@@ -288,13 +285,7 @@ function countMessageTokens(model, message) {
|
|
|
288
285
|
}
|
|
289
286
|
__name(countMessageTokens, "countMessageTokens");
|
|
290
287
|
function countTokens(model, text) {
|
|
291
|
-
|
|
292
|
-
try {
|
|
293
|
-
enc = (0, import_js_tiktoken.encodingForModel)(model);
|
|
294
|
-
} catch (e) {
|
|
295
|
-
enc = (0, import_js_tiktoken.encodingForModel)("gpt-4");
|
|
296
|
-
}
|
|
297
|
-
return enc.encode(text).length;
|
|
288
|
+
return text.length / 3;
|
|
298
289
|
}
|
|
299
290
|
__name(countTokens, "countTokens");
|
|
300
291
|
function convertActionInputToOpenAITool(action) {
|