@copilotkit/runtime 1.4.8-next.2 → 1.4.8
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 +7 -11
- package/__snapshots__/schema/schema.graphql +0 -1
- package/dist/{chunk-4OJDHGJU.mjs → chunk-GGNRDS7N.mjs} +2 -2
- package/dist/{chunk-4DFIC23L.mjs → chunk-LSLFIYKP.mjs} +2 -2
- package/dist/{chunk-MCVGZ4ZG.mjs → chunk-R6AUAQK6.mjs} +17 -30
- package/dist/chunk-R6AUAQK6.mjs.map +1 -0
- package/dist/{chunk-6SSIGQER.mjs → chunk-TA5I5LYF.mjs} +2 -2
- package/dist/{chunk-AKGNTDRV.mjs → chunk-W7GP2EOT.mjs} +1 -14
- package/dist/chunk-W7GP2EOT.mjs.map +1 -0
- package/dist/{copilot-runtime-1c5bf72b.d.ts → copilot-runtime-48d7c2fc.d.ts} +1 -1
- package/dist/{groq-adapter-b6a40422.d.ts → groq-adapter-ac43305a.d.ts} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/{langserve-6245df39.d.ts → langserve-b74e8606.d.ts} +1 -2
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +4 -27
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +5 -5
- package/dist/lib/integrations/index.d.ts +3 -3
- package/dist/lib/integrations/index.js +1 -8
- package/dist/lib/integrations/index.js.map +1 -1
- package/dist/lib/integrations/index.mjs +5 -5
- package/dist/lib/integrations/nest/index.d.ts +2 -2
- package/dist/lib/integrations/nest/index.js +1 -8
- package/dist/lib/integrations/nest/index.js.map +1 -1
- package/dist/lib/integrations/nest/index.mjs +3 -3
- package/dist/lib/integrations/node-express/index.d.ts +2 -2
- package/dist/lib/integrations/node-express/index.js +1 -8
- package/dist/lib/integrations/node-express/index.js.map +1 -1
- package/dist/lib/integrations/node-express/index.mjs +3 -3
- package/dist/lib/integrations/node-http/index.d.ts +2 -2
- package/dist/lib/integrations/node-http/index.js +1 -8
- package/dist/lib/integrations/node-http/index.js.map +1 -1
- package/dist/lib/integrations/node-http/index.mjs +2 -2
- package/dist/service-adapters/index.d.ts +3 -3
- package/dist/service-adapters/index.js +0 -13
- package/dist/service-adapters/index.js.map +1 -1
- package/dist/service-adapters/index.mjs +1 -1
- package/package.json +2 -2
- package/src/graphql/inputs/forwarded-parameters.input.ts +0 -3
- package/src/lib/runtime/copilot-runtime.ts +1 -7
- package/src/service-adapters/anthropic/anthropic-adapter.ts +0 -1
- package/src/service-adapters/events.ts +2 -2
- package/src/service-adapters/groq/groq-adapter.ts +0 -1
- package/src/service-adapters/openai/openai-adapter.ts +0 -1
- package/src/service-adapters/unify/unify-adapter.ts +0 -2
- package/dist/chunk-AKGNTDRV.mjs.map +0 -1
- package/dist/chunk-MCVGZ4ZG.mjs.map +0 -1
- /package/dist/{chunk-4OJDHGJU.mjs.map → chunk-GGNRDS7N.mjs.map} +0 -0
- /package/dist/{chunk-4DFIC23L.mjs.map → chunk-LSLFIYKP.mjs.map} +0 -0
- /package/dist/{chunk-6SSIGQER.mjs.map → chunk-TA5I5LYF.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
config,
|
|
4
4
|
copilotRuntimeNextJSAppRouterEndpoint,
|
|
5
5
|
copilotRuntimeNextJSPagesRouterEndpoint
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GGNRDS7N.mjs";
|
|
7
7
|
import {
|
|
8
8
|
copilotRuntimeNestEndpoint
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TA5I5LYF.mjs";
|
|
10
10
|
import {
|
|
11
11
|
copilotRuntimeNodeExpressEndpoint
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LSLFIYKP.mjs";
|
|
13
13
|
import {
|
|
14
14
|
CopilotRuntime,
|
|
15
15
|
buildSchema,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
getCommonConfig,
|
|
21
21
|
langGraphPlatformEndpoint,
|
|
22
22
|
resolveEndpointType
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-R6AUAQK6.mjs";
|
|
24
24
|
import {
|
|
25
25
|
AnthropicAdapter,
|
|
26
26
|
ExperimentalEmptyAdapter,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
OpenAIAssistantAdapter,
|
|
33
33
|
RemoteChain,
|
|
34
34
|
UnifyAdapter
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-W7GP2EOT.mjs";
|
|
36
36
|
import {
|
|
37
37
|
GuardrailsValidationFailureResponse,
|
|
38
38
|
MessageStreamInterruptedResponse,
|
|
@@ -82,7 +82,7 @@ declare class RuntimeEventSource {
|
|
|
82
82
|
private eventStream$;
|
|
83
83
|
private callback;
|
|
84
84
|
stream(callback: EventSourceCallback): Promise<void>;
|
|
85
|
-
sendErrorMessageToChat(): void;
|
|
85
|
+
sendErrorMessageToChat(message?: string): void;
|
|
86
86
|
processRuntimeEvents({ serverSideActions, guardrailsResult$, actionInputsWithoutAgents, }: {
|
|
87
87
|
serverSideActions: Action<any>[];
|
|
88
88
|
guardrailsResult$?: Subject<GuardrailsResult>;
|
|
@@ -96,7 +96,6 @@ declare class ForwardedParametersInput {
|
|
|
96
96
|
stop?: string[];
|
|
97
97
|
toolChoice?: String;
|
|
98
98
|
toolChoiceFunctionName?: string;
|
|
99
|
-
temperature?: number;
|
|
100
99
|
}
|
|
101
100
|
|
|
102
101
|
interface CopilotRuntimeChatCompletionRequest {
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { h as CommonConfig, b as CopilotRequestContextProperties, a as CopilotRuntime, C as CopilotRuntimeConstructorParams, d as CreateCopilotRuntimeServerOptions, G as GraphQLContext, g as buildSchema, c as copilotKitEndpoint, e as createContext, f as flattenToolCallsNoDuplicates, i as getCommonConfig, l as langGraphPlatformEndpoint, r as resolveEndpointType } from '../copilot-runtime-
|
|
2
|
-
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
|
+
export { h as CommonConfig, b as CopilotRequestContextProperties, a as CopilotRuntime, C as CopilotRuntimeConstructorParams, d as CreateCopilotRuntimeServerOptions, G as GraphQLContext, g as buildSchema, c as copilotKitEndpoint, e as createContext, f as flattenToolCallsNoDuplicates, i as getCommonConfig, l as langGraphPlatformEndpoint, r as resolveEndpointType } from '../copilot-runtime-48d7c2fc.js';
|
|
2
|
+
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-ac43305a.js';
|
|
3
3
|
export { CopilotRuntimeServerInstance, config, copilotRuntimeNextJSAppRouterEndpoint, copilotRuntimeNextJSPagesRouterEndpoint } from './integrations/index.js';
|
|
4
4
|
export { copilotRuntimeNodeHttpEndpoint } from './integrations/node-http/index.js';
|
|
5
5
|
export { copilotRuntimeNodeExpressEndpoint } from './integrations/node-express/index.js';
|
|
6
6
|
export { copilotRuntimeNestEndpoint } from './integrations/nest/index.js';
|
|
7
7
|
import '@copilotkit/shared';
|
|
8
|
-
import '../langserve-
|
|
8
|
+
import '../langserve-b74e8606.js';
|
|
9
9
|
import '../index-10b1c870.js';
|
|
10
10
|
import '../graphql/types/base/index.js';
|
|
11
11
|
import 'rxjs';
|
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.4.8
|
|
47
|
+
version: "1.4.8",
|
|
48
48
|
sideEffects: false,
|
|
49
49
|
main: "./dist/index.js",
|
|
50
50
|
module: "./dist/index.mjs",
|
|
@@ -419,9 +419,6 @@ var OpenAIAdapter = class {
|
|
|
419
419
|
},
|
|
420
420
|
...this.disableParallelToolCalls && {
|
|
421
421
|
parallel_tool_calls: false
|
|
422
|
-
},
|
|
423
|
-
...(forwardedParameters == null ? void 0 : forwardedParameters.temperature) && {
|
|
424
|
-
temperature: forwardedParameters.temperature
|
|
425
422
|
}
|
|
426
423
|
});
|
|
427
424
|
eventSource.stream(async (eventStream$) => {
|
|
@@ -892,7 +889,6 @@ var UnifyAdapter = class {
|
|
|
892
889
|
apiKey: this.apiKey,
|
|
893
890
|
baseURL: "https://api.unify.ai/v0/"
|
|
894
891
|
});
|
|
895
|
-
const forwardedParameters = request.forwardedParameters;
|
|
896
892
|
const messages = request.messages.map(convertMessageToOpenAIMessage);
|
|
897
893
|
const stream = await openai.chat.completions.create({
|
|
898
894
|
model: this.model,
|
|
@@ -900,9 +896,6 @@ var UnifyAdapter = class {
|
|
|
900
896
|
stream: true,
|
|
901
897
|
...tools.length > 0 && {
|
|
902
898
|
tools
|
|
903
|
-
},
|
|
904
|
-
...(forwardedParameters == null ? void 0 : forwardedParameters.temperature) && {
|
|
905
|
-
temperature: forwardedParameters.temperature
|
|
906
899
|
}
|
|
907
900
|
});
|
|
908
901
|
let model = null;
|
|
@@ -1006,9 +999,6 @@ var GroqAdapter = class {
|
|
|
1006
999
|
},
|
|
1007
1000
|
...this.disableParallelToolCalls && {
|
|
1008
1001
|
parallel_tool_calls: false
|
|
1009
|
-
},
|
|
1010
|
-
...(forwardedParameters == null ? void 0 : forwardedParameters.temperature) && {
|
|
1011
|
-
temperature: forwardedParameters.temperature
|
|
1012
1002
|
}
|
|
1013
1003
|
});
|
|
1014
1004
|
eventSource.stream(async (eventStream$) => {
|
|
@@ -2253,8 +2243,8 @@ var RuntimeEventSource = class {
|
|
|
2253
2243
|
async stream(callback) {
|
|
2254
2244
|
this.callback = callback;
|
|
2255
2245
|
}
|
|
2256
|
-
sendErrorMessageToChat() {
|
|
2257
|
-
const errorMessage =
|
|
2246
|
+
sendErrorMessageToChat(message = "An error occurred. Please try again.") {
|
|
2247
|
+
const errorMessage = `\u274C ${message}`;
|
|
2258
2248
|
if (!this.callback) {
|
|
2259
2249
|
this.stream(async (eventStream$) => {
|
|
2260
2250
|
eventStream$.sendTextMessage((0, import_shared8.randomId)(), errorMessage);
|
|
@@ -2576,13 +2566,7 @@ var CopilotRuntime = class {
|
|
|
2576
2566
|
} catch (error) {
|
|
2577
2567
|
console.error("Error getting response:", error);
|
|
2578
2568
|
eventSource.sendErrorMessageToChat();
|
|
2579
|
-
|
|
2580
|
-
threadId: threadId || (0, import_shared9.randomId)(),
|
|
2581
|
-
runId: runId || (0, import_shared9.randomId)(),
|
|
2582
|
-
eventSource,
|
|
2583
|
-
serverSideActions: [],
|
|
2584
|
-
actionInputsWithoutAgents: []
|
|
2585
|
-
};
|
|
2569
|
+
throw error;
|
|
2586
2570
|
}
|
|
2587
2571
|
}
|
|
2588
2572
|
async processAgentRequest(request) {
|
|
@@ -3097,7 +3081,6 @@ var ForwardedParametersInput = class {
|
|
|
3097
3081
|
stop;
|
|
3098
3082
|
toolChoice;
|
|
3099
3083
|
toolChoiceFunctionName;
|
|
3100
|
-
temperature;
|
|
3101
3084
|
};
|
|
3102
3085
|
__name(ForwardedParametersInput, "ForwardedParametersInput");
|
|
3103
3086
|
_ts_decorate7([
|
|
@@ -3132,12 +3115,6 @@ _ts_decorate7([
|
|
|
3132
3115
|
}),
|
|
3133
3116
|
_ts_metadata7("design:type", String)
|
|
3134
3117
|
], ForwardedParametersInput.prototype, "toolChoiceFunctionName", void 0);
|
|
3135
|
-
_ts_decorate7([
|
|
3136
|
-
(0, import_type_graphql8.Field)(() => Number, {
|
|
3137
|
-
nullable: true
|
|
3138
|
-
}),
|
|
3139
|
-
_ts_metadata7("design:type", Number)
|
|
3140
|
-
], ForwardedParametersInput.prototype, "temperature", void 0);
|
|
3141
3118
|
ForwardedParametersInput = _ts_decorate7([
|
|
3142
3119
|
(0, import_type_graphql8.InputType)()
|
|
3143
3120
|
], ForwardedParametersInput);
|