@copilotkit/runtime 1.50.0-beta.7 → 1.50.0-beta.9
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 +15 -3
- package/dist/{chunk-45RCC3ZS.mjs → chunk-BJEYMRDD.mjs} +2 -2
- package/dist/{chunk-OFSV5GET.mjs → chunk-DZV4ZIAR.mjs} +6 -17
- package/dist/chunk-DZV4ZIAR.mjs.map +1 -0
- package/dist/{chunk-AQG2SVCA.mjs → chunk-FMU55SEU.mjs} +2 -2
- package/dist/{chunk-DCEEHMLJ.mjs → chunk-SBCOROE4.mjs} +1 -16
- package/dist/chunk-SBCOROE4.mjs.map +1 -0
- package/dist/{chunk-ERUOA47O.mjs → chunk-TTUAEJLD.mjs} +2 -11
- package/dist/chunk-TTUAEJLD.mjs.map +1 -0
- package/dist/{chunk-4KES76K3.mjs → chunk-Z752VE75.mjs} +2 -2
- package/dist/graphql/types/converted/index.d.ts +1 -1
- package/dist/graphql/types/converted/index.js +110 -16
- package/dist/graphql/types/converted/index.js.map +1 -1
- package/dist/graphql/types/converted/index.mjs +3 -2
- package/dist/{groq-adapter-a6f5e9d2.d.ts → groq-adapter-50bc6e4a.d.ts} +1 -6
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -5
- package/dist/index.mjs.map +1 -1
- package/dist/{langserve-9fc76ce5.d.ts → langserve-74a52292.d.ts} +0 -1
- package/dist/lib/index.d.ts +59 -5
- package/dist/lib/index.js +779 -3678
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +18 -20
- package/dist/lib/integrations/index.d.ts +9 -15
- package/dist/lib/integrations/index.js +187 -215
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +7 -8
- package/dist/lib/integrations/nest/index.d.ts +6 -5
- package/dist/lib/integrations/nest/index.js +175 -197
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +5 -6
- package/dist/lib/integrations/node-express/index.d.ts +6 -5
- package/dist/lib/integrations/node-express/index.js +175 -197
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +5 -6
- package/dist/lib/integrations/node-http/index.d.ts +6 -5
- package/dist/lib/integrations/node-http/index.js +175 -197
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +4 -5
- package/dist/service-adapters/index.d.ts +11 -7
- package/dist/service-adapters/index.js +21 -8
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +4 -2
- package/dist/{shared-35c6eb04.d.ts → shared-f6d43ef8.d.ts} +1 -3
- package/package.json +4 -4
- package/src/lib/runtime/copilot-runtime.ts +2 -0
- package/dist/chunk-27JKTS6P.mjs +0 -1704
- package/dist/chunk-27JKTS6P.mjs.map +0 -1
- package/dist/chunk-2GPTVDTO.mjs +0 -25
- package/dist/chunk-3AJVKDZX.mjs +0 -3097
- package/dist/chunk-3AJVKDZX.mjs.map +0 -1
- package/dist/chunk-4EHJ4XFJ.mjs +0 -25
- package/dist/chunk-4EHJ4XFJ.mjs.map +0 -1
- package/dist/chunk-4IANB4TC.mjs +0 -25
- package/dist/chunk-4IANB4TC.mjs.map +0 -1
- package/dist/chunk-4OGE3SLW.mjs +0 -3100
- package/dist/chunk-4OGE3SLW.mjs.map +0 -1
- package/dist/chunk-54YJBMCP.mjs +0 -3097
- package/dist/chunk-54YJBMCP.mjs.map +0 -1
- package/dist/chunk-6ER4SZYH.mjs +0 -74
- package/dist/chunk-6ER4SZYH.mjs.map +0 -1
- package/dist/chunk-6TNSLHVR.mjs +0 -74
- package/dist/chunk-6TNSLHVR.mjs.map +0 -1
- package/dist/chunk-7V4BK7TZ.mjs +0 -25
- package/dist/chunk-7V4BK7TZ.mjs.map +0 -1
- package/dist/chunk-7YZIEXD2.mjs +0 -74
- package/dist/chunk-7YZIEXD2.mjs.map +0 -1
- package/dist/chunk-A4XHOAFU.mjs +0 -25
- package/dist/chunk-A4XHOAFU.mjs.map +0 -1
- package/dist/chunk-A555KEAD.mjs +0 -6020
- package/dist/chunk-A555KEAD.mjs.map +0 -1
- package/dist/chunk-AF73TFTX.mjs +0 -74
- package/dist/chunk-AF73TFTX.mjs.map +0 -1
- package/dist/chunk-AQG2SVCA.mjs.map +0 -1
- package/dist/chunk-BJZHMXND.mjs +0 -74
- package/dist/chunk-BJZHMXND.mjs.map +0 -1
- package/dist/chunk-CB2OJXF6.mjs +0 -25
- package/dist/chunk-CB2OJXF6.mjs.map +0 -1
- package/dist/chunk-CEOMFPJU.mjs +0 -6020
- package/dist/chunk-CEOMFPJU.mjs.map +0 -1
- package/dist/chunk-CZVLR7CC.mjs +0 -175
- package/dist/chunk-CZVLR7CC.mjs.map +0 -1
- package/dist/chunk-DCEEHMLJ.mjs.map +0 -1
- package/dist/chunk-DE3CLKUG.mjs +0 -25
- package/dist/chunk-DE3CLKUG.mjs.map +0 -1
- package/dist/chunk-DTPRUTNV.mjs +0 -25
- package/dist/chunk-DTPRUTNV.mjs.map +0 -1
- package/dist/chunk-ERUOA47O.mjs.map +0 -1
- package/dist/chunk-ESSRC64W.mjs +0 -74
- package/dist/chunk-ESSRC64W.mjs.map +0 -1
- package/dist/chunk-GRAN6K6N.mjs +0 -25
- package/dist/chunk-GRAN6K6N.mjs.map +0 -1
- package/dist/chunk-I27F2UPA.mjs +0 -175
- package/dist/chunk-I27F2UPA.mjs.map +0 -1
- package/dist/chunk-IAZKTOQW.mjs +0 -25
- package/dist/chunk-IAZKTOQW.mjs.map +0 -1
- package/dist/chunk-J6XZ5MFB.mjs +0 -25
- package/dist/chunk-J6XZ5MFB.mjs.map +0 -1
- package/dist/chunk-JJ32MA4C.mjs +0 -73
- package/dist/chunk-JJ32MA4C.mjs.map +0 -1
- package/dist/chunk-JJY4ZTHQ.mjs +0 -25
- package/dist/chunk-JJY4ZTHQ.mjs.map +0 -1
- package/dist/chunk-KEYLBFU2.mjs +0 -3117
- package/dist/chunk-KEYLBFU2.mjs.map +0 -1
- package/dist/chunk-KQ53L4WZ.mjs +0 -3094
- package/dist/chunk-KQ53L4WZ.mjs.map +0 -1
- package/dist/chunk-KTELVQ67.mjs +0 -3098
- package/dist/chunk-KTELVQ67.mjs.map +0 -1
- package/dist/chunk-LPEPX6NH.mjs +0 -25
- package/dist/chunk-LPEPX6NH.mjs.map +0 -1
- package/dist/chunk-MDXE55DK.mjs +0 -3117
- package/dist/chunk-MDXE55DK.mjs.map +0 -1
- package/dist/chunk-MMFUVOXH.mjs +0 -73
- package/dist/chunk-MMFUVOXH.mjs.map +0 -1
- package/dist/chunk-N3Y4U66N.mjs +0 -253
- package/dist/chunk-N3Y4U66N.mjs.map +0 -1
- package/dist/chunk-O7UYB4MH.mjs +0 -25
- package/dist/chunk-O7UYB4MH.mjs.map +0 -1
- package/dist/chunk-OFNVQHNM.mjs +0 -3089
- package/dist/chunk-OFNVQHNM.mjs.map +0 -1
- package/dist/chunk-OFSV5GET.mjs.map +0 -1
- package/dist/chunk-OMRST67R.mjs +0 -25
- package/dist/chunk-OMRST67R.mjs.map +0 -1
- package/dist/chunk-PRZHE74A.mjs +0 -25
- package/dist/chunk-PRZHE74A.mjs.map +0 -1
- package/dist/chunk-PTYRVXXP.mjs +0 -80
- package/dist/chunk-PTYRVXXP.mjs.map +0 -1
- package/dist/chunk-R22B5CCO.mjs +0 -25
- package/dist/chunk-R22B5CCO.mjs.map +0 -1
- package/dist/chunk-SHBDMA63.mjs +0 -141
- package/dist/chunk-SHBDMA63.mjs.map +0 -1
- package/dist/chunk-SPVXBPRA.mjs +0 -74
- package/dist/chunk-SPVXBPRA.mjs.map +0 -1
- package/dist/chunk-T72G46ME.mjs +0 -25
- package/dist/chunk-T72G46ME.mjs.map +0 -1
- package/dist/chunk-TGELROPU.mjs +0 -25
- package/dist/chunk-TGELROPU.mjs.map +0 -1
- package/dist/chunk-UNX4IAAD.mjs +0 -25
- package/dist/chunk-UNX4IAAD.mjs.map +0 -1
- package/dist/chunk-V4DHVC7M.mjs +0 -3085
- package/dist/chunk-V4DHVC7M.mjs.map +0 -1
- package/dist/chunk-VVRFOB66.mjs +0 -25
- package/dist/chunk-VVRFOB66.mjs.map +0 -1
- package/dist/chunk-W6NVBYM6.mjs +0 -80
- package/dist/chunk-W6NVBYM6.mjs.map +0 -1
- package/dist/chunk-W7MBACGC.mjs +0 -74
- package/dist/chunk-W7MBACGC.mjs.map +0 -1
- package/dist/chunk-WMD4XZZS.mjs +0 -25
- package/dist/chunk-WMD4XZZS.mjs.map +0 -1
- package/dist/chunk-WX2ZNCRT.mjs +0 -74
- package/dist/chunk-WX2ZNCRT.mjs.map +0 -1
- package/dist/chunk-Y2Z62E2T.mjs +0 -74
- package/dist/chunk-Y2Z62E2T.mjs.map +0 -1
- package/dist/chunk-YO4I6RVI.mjs +0 -25
- package/dist/chunk-YO4I6RVI.mjs.map +0 -1
- package/dist/chunk-Z6Q5IW6I.mjs +0 -3098
- package/dist/chunk-Z6Q5IW6I.mjs.map +0 -1
- package/dist/chunk-Z726O3G2.mjs +0 -25
- package/dist/chunk-Z726O3G2.mjs.map +0 -1
- package/dist/chunk-ZE4SMZZR.mjs +0 -3097
- package/dist/chunk-ZE4SMZZR.mjs.map +0 -1
- package/dist/chunk-ZULZB33C.mjs +0 -73
- package/dist/chunk-ZULZB33C.mjs.map +0 -1
- package/dist/chunk-ZVRGXMY7.mjs +0 -25
- package/dist/chunk-ZVRGXMY7.mjs.map +0 -1
- package/dist/chunk-ZZ35WBYQ.mjs +0 -25
- package/dist/chunk-ZZ35WBYQ.mjs.map +0 -1
- package/dist/groq-adapter-540da9c3.d.ts +0 -331
- package/dist/groq-adapter-c8aec5c5.d.ts +0 -321
- package/dist/index-96b330da.d.ts +0 -119
- package/dist/langserve-0c6100e3.d.ts +0 -257
- package/dist/langserve-978d5790.d.ts +0 -243
- package/dist/shared-0a7346ce.d.ts +0 -466
- package/dist/shared-9ed1dc31.d.ts +0 -414
- package/dist/shared-da5708fe.d.ts +0 -449
- /package/dist/{chunk-45RCC3ZS.mjs.map → chunk-BJEYMRDD.mjs.map} +0 -0
- /package/dist/{chunk-2GPTVDTO.mjs.map → chunk-FMU55SEU.mjs.map} +0 -0
- /package/dist/{chunk-4KES76K3.mjs.map → chunk-Z752VE75.mjs.map} +0 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
copilotRuntimeNodeHttpEndpoint
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-27JKTS6P.mjs";
|
|
5
|
-
import "../../../chunk-XWBDEXDA.mjs";
|
|
6
|
-
import "../../../chunk-AMUJQ6IR.mjs";
|
|
7
|
-
import "../../../chunk-SHBDMA63.mjs";
|
|
3
|
+
} from "../../../chunk-DZV4ZIAR.mjs";
|
|
8
4
|
import "../../../chunk-2OZAGFV3.mjs";
|
|
5
|
+
import "../../../chunk-XWBDEXDA.mjs";
|
|
6
|
+
import "../../../chunk-62NE5S6M.mjs";
|
|
7
|
+
import "../../../chunk-OWIGJONH.mjs";
|
|
9
8
|
import "../../../chunk-FHD4JECV.mjs";
|
|
10
9
|
export {
|
|
11
10
|
copilotRuntimeNodeHttpEndpoint
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { b as CopilotServiceAdapter, C as CopilotRuntimeChatCompletionRequest, a as CopilotRuntimeChatCompletionResponse } from '../langserve-
|
|
2
|
-
export { c as RemoteChain, R as RemoteChainParameters } from '../langserve-
|
|
1
|
+
import { b as CopilotServiceAdapter, C as CopilotRuntimeChatCompletionRequest, a as CopilotRuntimeChatCompletionResponse } from '../langserve-74a52292.js';
|
|
2
|
+
export { c as RemoteChain, R as RemoteChainParameters } from '../langserve-74a52292.js';
|
|
3
3
|
export { convertServiceAdapterError } from './shared/index.js';
|
|
4
|
-
import { L as LangChainAdapter } from '../groq-adapter-
|
|
5
|
-
export { G as GoogleGenerativeAIAdapter, f as GroqAdapter, e as GroqAdapterParams, a as OpenAIAdapter, O as OpenAIAdapterParams, c as OpenAIAssistantAdapter, b as OpenAIAssistantAdapterParams, d as UnifyAdapter, U as UnifyAdapterParams } from '../groq-adapter-
|
|
4
|
+
import { L as LangChainAdapter } from '../groq-adapter-50bc6e4a.js';
|
|
5
|
+
export { G as GoogleGenerativeAIAdapter, f as GroqAdapter, e as GroqAdapterParams, a as OpenAIAdapter, O as OpenAIAdapterParams, c as OpenAIAssistantAdapter, b as OpenAIAssistantAdapterParams, d as UnifyAdapter, U as UnifyAdapterParams } from '../groq-adapter-50bc6e4a.js';
|
|
6
6
|
import Anthropic from '@anthropic-ai/sdk';
|
|
7
|
-
import '../index-
|
|
7
|
+
import '../index-adbd78f1.js';
|
|
8
8
|
import '../graphql/types/base/index.js';
|
|
9
9
|
import 'rxjs';
|
|
10
10
|
import '@copilotkit/shared';
|
|
@@ -66,7 +66,8 @@ interface AnthropicAdapterParams {
|
|
|
66
66
|
promptCaching?: AnthropicPromptCachingConfig;
|
|
67
67
|
}
|
|
68
68
|
declare class AnthropicAdapter implements CopilotServiceAdapter {
|
|
69
|
-
|
|
69
|
+
model: string;
|
|
70
|
+
provider: string;
|
|
70
71
|
private promptCaching;
|
|
71
72
|
private _anthropic;
|
|
72
73
|
get anthropic(): Anthropic;
|
|
@@ -87,7 +88,8 @@ interface OllamaAdapterOptions {
|
|
|
87
88
|
model?: string;
|
|
88
89
|
}
|
|
89
90
|
declare class ExperimentalOllamaAdapter implements CopilotServiceAdapter {
|
|
90
|
-
|
|
91
|
+
model: string;
|
|
92
|
+
provider: string;
|
|
91
93
|
constructor(options?: OllamaAdapterOptions);
|
|
92
94
|
process(request: CopilotRuntimeChatCompletionRequest): Promise<CopilotRuntimeChatCompletionResponse>;
|
|
93
95
|
}
|
|
@@ -133,6 +135,8 @@ interface BedrockAdapterParams {
|
|
|
133
135
|
};
|
|
134
136
|
}
|
|
135
137
|
declare class BedrockAdapter extends LangChainAdapter {
|
|
138
|
+
provider: string;
|
|
139
|
+
model: string;
|
|
136
140
|
constructor(options?: BedrockAdapterParams);
|
|
137
141
|
}
|
|
138
142
|
|
|
@@ -356,6 +356,7 @@ var import_shared3 = require("@copilotkit/shared");
|
|
|
356
356
|
var DEFAULT_MODEL = "gpt-4o";
|
|
357
357
|
var OpenAIAdapter = class {
|
|
358
358
|
model = DEFAULT_MODEL;
|
|
359
|
+
provider = "openai";
|
|
359
360
|
disableParallelToolCalls = false;
|
|
360
361
|
_openai;
|
|
361
362
|
keepSystemRole = false;
|
|
@@ -779,7 +780,10 @@ __name(LangChainAdapter, "LangChainAdapter");
|
|
|
779
780
|
// src/service-adapters/google/google-genai-adapter.ts
|
|
780
781
|
var import_google_gauth = require("@langchain/google-gauth");
|
|
781
782
|
var import_messages2 = require("@langchain/core/messages");
|
|
783
|
+
var DEFAULT_MODEL2 = "gemini-1.5-pro";
|
|
782
784
|
var GoogleGenerativeAIAdapter = class extends LangChainAdapter {
|
|
785
|
+
provider = "google";
|
|
786
|
+
model = DEFAULT_MODEL2;
|
|
783
787
|
constructor(options) {
|
|
784
788
|
super({
|
|
785
789
|
chainFn: async ({ messages, tools, threadId }) => {
|
|
@@ -789,9 +793,10 @@ var GoogleGenerativeAIAdapter = class extends LangChainAdapter {
|
|
|
789
793
|
}
|
|
790
794
|
return message.content && String(message.content).trim().length > 0 || message.tool_calls && message.tool_calls.length > 0;
|
|
791
795
|
});
|
|
796
|
+
this.model = (options == null ? void 0 : options.model) ?? "gemini-1.5-pro";
|
|
792
797
|
const model = new import_google_gauth.ChatGoogle({
|
|
793
798
|
apiKey: (options == null ? void 0 : options.apiKey) ?? process.env.GOOGLE_API_KEY,
|
|
794
|
-
modelName:
|
|
799
|
+
modelName: this.model,
|
|
795
800
|
apiVersion: "v1beta"
|
|
796
801
|
}).bindTools(tools);
|
|
797
802
|
return model.stream(filteredMessages, {
|
|
@@ -1013,6 +1018,7 @@ var UnifyAdapter = class {
|
|
|
1013
1018
|
apiKey;
|
|
1014
1019
|
model;
|
|
1015
1020
|
start;
|
|
1021
|
+
provider = "unify";
|
|
1016
1022
|
constructor(options) {
|
|
1017
1023
|
if (options == null ? void 0 : options.apiKey) {
|
|
1018
1024
|
this.apiKey = options.apiKey;
|
|
@@ -1126,9 +1132,10 @@ __name(UnifyAdapter, "UnifyAdapter");
|
|
|
1126
1132
|
// src/service-adapters/groq/groq-adapter.ts
|
|
1127
1133
|
var import_groq_sdk = require("groq-sdk");
|
|
1128
1134
|
var import_shared8 = require("@copilotkit/shared");
|
|
1129
|
-
var
|
|
1135
|
+
var DEFAULT_MODEL3 = "llama-3.3-70b-versatile";
|
|
1130
1136
|
var GroqAdapter = class {
|
|
1131
|
-
model =
|
|
1137
|
+
model = DEFAULT_MODEL3;
|
|
1138
|
+
provider = "groq";
|
|
1132
1139
|
disableParallelToolCalls = false;
|
|
1133
1140
|
_groq;
|
|
1134
1141
|
get groq() {
|
|
@@ -1406,9 +1413,10 @@ __name(convertMessageToAnthropicMessage, "convertMessageToAnthropicMessage");
|
|
|
1406
1413
|
|
|
1407
1414
|
// src/service-adapters/anthropic/anthropic-adapter.ts
|
|
1408
1415
|
var import_shared10 = require("@copilotkit/shared");
|
|
1409
|
-
var
|
|
1416
|
+
var DEFAULT_MODEL4 = "claude-3-5-sonnet-latest";
|
|
1410
1417
|
var AnthropicAdapter = class {
|
|
1411
|
-
model =
|
|
1418
|
+
model = DEFAULT_MODEL4;
|
|
1419
|
+
provider = "anthropic";
|
|
1412
1420
|
promptCaching;
|
|
1413
1421
|
_anthropic;
|
|
1414
1422
|
get anthropic() {
|
|
@@ -1696,14 +1704,15 @@ var FilterThinkingTextBuffer = /* @__PURE__ */ __name(class FilterThinkingTextBu
|
|
|
1696
1704
|
// src/service-adapters/experimental/ollama/ollama-adapter.ts
|
|
1697
1705
|
var import_ollama = require("@langchain/community/llms/ollama");
|
|
1698
1706
|
var import_shared12 = require("@copilotkit/shared");
|
|
1699
|
-
var
|
|
1707
|
+
var DEFAULT_MODEL5 = "llama3:latest";
|
|
1700
1708
|
var ExperimentalOllamaAdapter = class {
|
|
1701
1709
|
model;
|
|
1710
|
+
provider = "ollama";
|
|
1702
1711
|
constructor(options) {
|
|
1703
1712
|
if (options == null ? void 0 : options.model) {
|
|
1704
1713
|
this.model = options.model;
|
|
1705
1714
|
} else {
|
|
1706
|
-
this.model =
|
|
1715
|
+
this.model = DEFAULT_MODEL5;
|
|
1707
1716
|
}
|
|
1708
1717
|
}
|
|
1709
1718
|
async process(request) {
|
|
@@ -1738,12 +1747,16 @@ __name(ExperimentalOllamaAdapter, "ExperimentalOllamaAdapter");
|
|
|
1738
1747
|
|
|
1739
1748
|
// src/service-adapters/bedrock/bedrock-adapter.ts
|
|
1740
1749
|
var import_aws = require("@langchain/aws");
|
|
1750
|
+
var DEFAULT_MODEL6 = "amazon.nova-lite-v1:0";
|
|
1741
1751
|
var BedrockAdapter = class extends LangChainAdapter {
|
|
1752
|
+
provider = "bedrock";
|
|
1753
|
+
model = DEFAULT_MODEL6;
|
|
1742
1754
|
constructor(options) {
|
|
1743
1755
|
super({
|
|
1744
1756
|
chainFn: async ({ messages, tools, threadId }) => {
|
|
1757
|
+
this.model = (options == null ? void 0 : options.model) ?? "amazon.nova-lite-v1:0";
|
|
1745
1758
|
const model = new import_aws.ChatBedrockConverse({
|
|
1746
|
-
model:
|
|
1759
|
+
model: this.model,
|
|
1747
1760
|
region: (options == null ? void 0 : options.region) ?? "us-east-1",
|
|
1748
1761
|
credentials: (options == null ? void 0 : options.credentials) ? {
|
|
1749
1762
|
accessKeyId: options.credentials.accessKeyId,
|