@copilotkit/runtime 1.8.6-next.0 → 1.8.7-next.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 +16 -0
- package/__snapshots__/schema/schema.graphql +18 -0
- package/dist/{chunk-NKMMHPPX.mjs → chunk-BXJZ5GEO.mjs} +2 -2
- package/dist/{chunk-3KFMOJC6.mjs → chunk-CWPYW7XE.mjs} +2 -2
- package/dist/{chunk-DNI7KA7Y.mjs → chunk-EY6RUVB7.mjs} +44 -1
- package/dist/chunk-EY6RUVB7.mjs.map +1 -0
- package/dist/{chunk-H2VC34X7.mjs → chunk-JSV26III.mjs} +97 -4
- package/dist/chunk-JSV26III.mjs.map +1 -0
- package/dist/{chunk-D4R6RNSD.mjs → chunk-RU5CS42E.mjs} +2 -2
- package/dist/{chunk-RTFJTJMA.mjs → chunk-SHBDMA63.mjs} +14 -2
- package/dist/chunk-SHBDMA63.mjs.map +1 -0
- package/dist/graphql/types/converted/index.d.ts +1 -1
- package/dist/graphql/types/converted/index.js +13 -0
- package/dist/graphql/types/converted/index.js.map +1 -1
- package/dist/graphql/types/converted/index.mjs +3 -1
- package/dist/{groq-adapter-fb9aa3ab.d.ts → groq-adapter-53d3fa48.d.ts} +1 -1
- package/dist/{index-5bec5424.d.ts → index-d4614f9b.d.ts} +17 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +147 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/{langserve-6f7af8d3.d.ts → langserve-c9a20fe9.d.ts} +1 -1
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.js +116 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +6 -6
- package/dist/lib/integrations/index.d.ts +4 -4
- package/dist/lib/integrations/index.js +71 -1
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +6 -6
- package/dist/lib/integrations/nest/index.d.ts +3 -3
- package/dist/lib/integrations/nest/index.js +71 -1
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +4 -4
- package/dist/lib/integrations/node-express/index.d.ts +3 -3
- package/dist/lib/integrations/node-express/index.js +71 -1
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +4 -4
- package/dist/lib/integrations/node-http/index.d.ts +3 -3
- package/dist/lib/integrations/node-http/index.js +71 -1
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +3 -3
- package/dist/service-adapters/index.d.ts +4 -4
- package/dist/service-adapters/index.js +43 -0
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +1 -1
- package/dist/{shared-93687488.d.ts → shared-350db43f.d.ts} +2 -2
- package/package.json +2 -2
- package/src/graphql/inputs/message.input.ts +18 -0
- package/src/graphql/types/converted/index.ts +15 -1
- package/src/graphql/types/copilot-response.type.ts +17 -0
- package/src/lib/runtime/remote-lg-action.ts +19 -0
- package/src/service-adapters/anthropic/utils.ts +32 -0
- package/src/service-adapters/conversion.ts +10 -0
- package/src/service-adapters/openai/utils.ts +12 -0
- package/dist/chunk-DNI7KA7Y.mjs.map +0 -1
- package/dist/chunk-H2VC34X7.mjs.map +0 -1
- package/dist/chunk-RTFJTJMA.mjs.map +0 -1
- /package/dist/{chunk-NKMMHPPX.mjs.map → chunk-BXJZ5GEO.mjs.map} +0 -0
- /package/dist/{chunk-3KFMOJC6.mjs.map → chunk-CWPYW7XE.mjs.map} +0 -0
- /package/dist/{chunk-D4R6RNSD.mjs.map → chunk-RU5CS42E.mjs.map} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
copilotRuntimeNodeHttpEndpoint
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
3
|
+
} from "../../../chunk-JSV26III.mjs";
|
|
4
|
+
import "../../../chunk-EY6RUVB7.mjs";
|
|
5
5
|
import "../../../chunk-5BIEM2UU.mjs";
|
|
6
|
-
import "../../../chunk-
|
|
6
|
+
import "../../../chunk-SHBDMA63.mjs";
|
|
7
7
|
import "../../../chunk-2OZAGFV3.mjs";
|
|
8
8
|
import "../../../chunk-FHD4JECV.mjs";
|
|
9
9
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { b as CopilotServiceAdapter, C as CopilotRuntimeChatCompletionRequest, a as CopilotRuntimeChatCompletionResponse } from '../langserve-
|
|
2
|
-
export { c as RemoteChain, R as RemoteChainParameters } from '../langserve-
|
|
3
|
-
export { G as GoogleGenerativeAIAdapter, f as GroqAdapter, e as GroqAdapterParams, L as LangChainAdapter, a as OpenAIAdapter, O as OpenAIAdapterParams, c as OpenAIAssistantAdapter, b as OpenAIAssistantAdapterParams, d as UnifyAdapter, U as UnifyAdapterParams } from '../groq-adapter-
|
|
1
|
+
import { b as CopilotServiceAdapter, C as CopilotRuntimeChatCompletionRequest, a as CopilotRuntimeChatCompletionResponse } from '../langserve-c9a20fe9.js';
|
|
2
|
+
export { c as RemoteChain, R as RemoteChainParameters } from '../langserve-c9a20fe9.js';
|
|
3
|
+
export { G as GoogleGenerativeAIAdapter, f as GroqAdapter, e as GroqAdapterParams, L as LangChainAdapter, a as OpenAIAdapter, O as OpenAIAdapterParams, c as OpenAIAssistantAdapter, b as OpenAIAssistantAdapterParams, d as UnifyAdapter, U as UnifyAdapterParams } from '../groq-adapter-53d3fa48.js';
|
|
4
4
|
import Anthropic from '@anthropic-ai/sdk';
|
|
5
|
-
import '../index-
|
|
5
|
+
import '../index-d4614f9b.js';
|
|
6
6
|
import '../graphql/types/base/index.js';
|
|
7
7
|
import 'rxjs';
|
|
8
8
|
import '@copilotkit/shared';
|
|
@@ -258,6 +258,18 @@ function convertMessageToOpenAIMessage(message, options) {
|
|
|
258
258
|
role,
|
|
259
259
|
content: message.content
|
|
260
260
|
};
|
|
261
|
+
} else if (message.isImageMessage()) {
|
|
262
|
+
return {
|
|
263
|
+
role: "user",
|
|
264
|
+
content: [
|
|
265
|
+
{
|
|
266
|
+
type: "image_url",
|
|
267
|
+
image_url: {
|
|
268
|
+
url: `data:image/${message.format};base64,${message.bytes}`
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
};
|
|
261
273
|
} else if (message.isActionExecutionMessage()) {
|
|
262
274
|
return {
|
|
263
275
|
role: "assistant",
|
|
@@ -1233,6 +1245,37 @@ function convertMessageToAnthropicMessage(message) {
|
|
|
1233
1245
|
]
|
|
1234
1246
|
};
|
|
1235
1247
|
}
|
|
1248
|
+
} else if (message.isImageMessage()) {
|
|
1249
|
+
let mediaType;
|
|
1250
|
+
switch (message.format) {
|
|
1251
|
+
case "jpeg":
|
|
1252
|
+
mediaType = "image/jpeg";
|
|
1253
|
+
break;
|
|
1254
|
+
case "png":
|
|
1255
|
+
mediaType = "image/png";
|
|
1256
|
+
break;
|
|
1257
|
+
case "webp":
|
|
1258
|
+
mediaType = "image/webp";
|
|
1259
|
+
break;
|
|
1260
|
+
case "gif":
|
|
1261
|
+
mediaType = "image/gif";
|
|
1262
|
+
break;
|
|
1263
|
+
default:
|
|
1264
|
+
throw new Error(`Unsupported image format: ${message.format}`);
|
|
1265
|
+
}
|
|
1266
|
+
return {
|
|
1267
|
+
role: "user",
|
|
1268
|
+
content: [
|
|
1269
|
+
{
|
|
1270
|
+
type: "image",
|
|
1271
|
+
source: {
|
|
1272
|
+
type: "base64",
|
|
1273
|
+
media_type: mediaType,
|
|
1274
|
+
data: message.bytes
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
]
|
|
1278
|
+
};
|
|
1236
1279
|
} else if (message.isActionExecutionMessage()) {
|
|
1237
1280
|
return {
|
|
1238
1281
|
role: "assistant",
|