@copilotkit/runtime 1.5.8 → 1.5.10-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 +21 -0
- package/__snapshots__/schema/schema.graphql +273 -0
- package/dist/chunk-44O2JGUY.mjs +12 -0
- package/dist/chunk-44O2JGUY.mjs.map +1 -0
- package/dist/chunk-5SDH2PVU.mjs +3395 -0
- package/dist/chunk-5SDH2PVU.mjs.map +1 -0
- package/dist/chunk-CLGKEUOA.mjs +1408 -0
- package/dist/chunk-CLGKEUOA.mjs.map +1 -0
- package/dist/chunk-D2WLFQS6.mjs +43 -0
- package/dist/chunk-D2WLFQS6.mjs.map +1 -0
- package/dist/chunk-DFOKBSIS.mjs +1 -0
- package/dist/chunk-DFOKBSIS.mjs.map +1 -0
- package/dist/chunk-OZLXON7T.mjs +25 -0
- package/dist/chunk-OZLXON7T.mjs.map +1 -0
- package/dist/chunk-RFF5IIZJ.mjs +66 -0
- package/dist/chunk-RFF5IIZJ.mjs.map +1 -0
- package/dist/chunk-T4EYPND5.mjs +25 -0
- package/dist/chunk-T4EYPND5.mjs.map +1 -0
- package/dist/chunk-U3V2BCGI.mjs +152 -0
- package/dist/chunk-U3V2BCGI.mjs.map +1 -0
- package/dist/chunk-YTXDY7ZM.mjs +80 -0
- package/dist/chunk-YTXDY7ZM.mjs.map +1 -0
- package/dist/copilot-runtime-36700e00.d.ts +196 -0
- package/dist/graphql/types/base/index.d.ts +6 -0
- package/dist/graphql/types/base/index.js +63 -0
- package/dist/graphql/types/base/index.js.map +1 -0
- package/dist/graphql/types/base/index.mjs +8 -0
- package/dist/graphql/types/base/index.mjs.map +1 -0
- package/dist/graphql/types/converted/index.d.ts +2 -0
- package/dist/graphql/types/converted/index.js +124 -0
- package/dist/graphql/types/converted/index.js.map +1 -0
- package/dist/graphql/types/converted/index.mjs +17 -0
- package/dist/graphql/types/converted/index.mjs.map +1 -0
- package/dist/groq-adapter-696b5d29.d.ts +281 -0
- package/dist/index-cc2b17be.d.ts +87 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +5153 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +76 -0
- package/dist/index.mjs.map +1 -0
- package/dist/langserve-9125a12e.d.ts +176 -0
- package/dist/lib/cloud/index.d.ts +6 -0
- package/dist/lib/cloud/index.js +18 -0
- package/dist/lib/cloud/index.js.map +1 -0
- package/dist/lib/cloud/index.mjs +1 -0
- package/dist/lib/cloud/index.mjs.map +1 -0
- package/dist/lib/index.d.ts +20 -0
- package/dist/lib/index.js +4801 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/index.mjs +58 -0
- package/dist/lib/index.mjs.map +1 -0
- package/dist/lib/integrations/index.d.ts +33 -0
- package/dist/lib/integrations/index.js +2166 -0
- package/dist/lib/integrations/index.js.map +1 -0
- package/dist/lib/integrations/index.mjs +34 -0
- package/dist/lib/integrations/index.mjs.map +1 -0
- package/dist/lib/integrations/nest/index.d.ts +14 -0
- package/dist/lib/integrations/nest/index.js +2075 -0
- package/dist/lib/integrations/nest/index.js.map +1 -0
- package/dist/lib/integrations/nest/index.mjs +13 -0
- package/dist/lib/integrations/nest/index.mjs.map +1 -0
- package/dist/lib/integrations/node-express/index.d.ts +14 -0
- package/dist/lib/integrations/node-express/index.js +2075 -0
- package/dist/lib/integrations/node-express/index.js.map +1 -0
- package/dist/lib/integrations/node-express/index.mjs +13 -0
- package/dist/lib/integrations/node-express/index.mjs.map +1 -0
- package/dist/lib/integrations/node-http/index.d.ts +14 -0
- package/dist/lib/integrations/node-http/index.js +2061 -0
- package/dist/lib/integrations/node-http/index.js.map +1 -0
- package/dist/lib/integrations/node-http/index.mjs +12 -0
- package/dist/lib/integrations/node-http/index.mjs.map +1 -0
- package/dist/service-adapters/index.d.ts +84 -0
- package/dist/service-adapters/index.js +1448 -0
- package/dist/service-adapters/index.js.map +1 -0
- package/dist/service-adapters/index.mjs +26 -0
- package/dist/service-adapters/index.mjs.map +1 -0
- package/dist/utils/index.d.ts +49 -0
- package/dist/utils/index.js +174 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/index.mjs +12 -0
- package/dist/utils/index.mjs.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import OpenAI from 'openai';
|
|
2
|
+
import { b as CopilotServiceAdapter, C as CopilotRuntimeChatCompletionRequest, a as CopilotRuntimeChatCompletionResponse } from './langserve-9125a12e.js';
|
|
3
|
+
import { BaseMessageChunk, AIMessage, AIMessageChunk, BaseMessage } from '@langchain/core/messages';
|
|
4
|
+
import { DynamicStructuredTool } from '@langchain/core/tools';
|
|
5
|
+
import { IterableReadableStream, IterableReadableStreamInterface } from '@langchain/core/utils/stream';
|
|
6
|
+
import { Groq } from 'groq-sdk';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Copilot Runtime adapter for OpenAI.
|
|
10
|
+
*
|
|
11
|
+
* ## Example
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* import { CopilotRuntime, OpenAIAdapter } from "@copilotkit/runtime";
|
|
15
|
+
* import OpenAI from "openai";
|
|
16
|
+
*
|
|
17
|
+
* const copilotKit = new CopilotRuntime();
|
|
18
|
+
*
|
|
19
|
+
* const openai = new OpenAI({
|
|
20
|
+
* organization: "<your-organization-id>", // optional
|
|
21
|
+
* apiKey: "<your-api-key>",
|
|
22
|
+
* });
|
|
23
|
+
*
|
|
24
|
+
* return new OpenAIAdapter({ openai });
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* ## Example with Azure OpenAI
|
|
28
|
+
*
|
|
29
|
+
* ```ts
|
|
30
|
+
* import { CopilotRuntime, OpenAIAdapter } from "@copilotkit/runtime";
|
|
31
|
+
* import OpenAI from "openai";
|
|
32
|
+
*
|
|
33
|
+
* // The name of your Azure OpenAI Instance.
|
|
34
|
+
* // https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal#create-a-resource
|
|
35
|
+
* const instance = "<your instance name>";
|
|
36
|
+
*
|
|
37
|
+
* // Corresponds to your Model deployment within your OpenAI resource, e.g. my-gpt35-16k-deployment
|
|
38
|
+
* // Navigate to the Azure OpenAI Studio to deploy a model.
|
|
39
|
+
* const model = "<your model>";
|
|
40
|
+
*
|
|
41
|
+
* const apiKey = process.env["AZURE_OPENAI_API_KEY"];
|
|
42
|
+
* if (!apiKey) {
|
|
43
|
+
* throw new Error("The AZURE_OPENAI_API_KEY environment variable is missing or empty.");
|
|
44
|
+
* }
|
|
45
|
+
*
|
|
46
|
+
* const copilotKit = new CopilotRuntime();
|
|
47
|
+
*
|
|
48
|
+
* const openai = new OpenAI({
|
|
49
|
+
* apiKey,
|
|
50
|
+
* baseURL: `https://${instance}.openai.azure.com/openai/deployments/${model}`,
|
|
51
|
+
* defaultQuery: { "api-version": "2024-04-01-preview" },
|
|
52
|
+
* defaultHeaders: { "api-key": apiKey },
|
|
53
|
+
* });
|
|
54
|
+
*
|
|
55
|
+
* return new OpenAIAdapter({ openai });
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
interface OpenAIAdapterParams {
|
|
60
|
+
/**
|
|
61
|
+
* An optional OpenAI instance to use. If not provided, a new instance will be
|
|
62
|
+
* created.
|
|
63
|
+
*/
|
|
64
|
+
openai?: OpenAI;
|
|
65
|
+
/**
|
|
66
|
+
* The model to use.
|
|
67
|
+
*/
|
|
68
|
+
model?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Whether to disable parallel tool calls.
|
|
71
|
+
* You can disable parallel tool calls to force the model to execute tool calls sequentially.
|
|
72
|
+
* This is useful if you want to execute tool calls in a specific order so that the state changes
|
|
73
|
+
* introduced by one tool call are visible to the next tool call. (i.e. new actions or readables)
|
|
74
|
+
*
|
|
75
|
+
* @default false
|
|
76
|
+
*/
|
|
77
|
+
disableParallelToolCalls?: boolean;
|
|
78
|
+
}
|
|
79
|
+
declare class OpenAIAdapter implements CopilotServiceAdapter {
|
|
80
|
+
private model;
|
|
81
|
+
private disableParallelToolCalls;
|
|
82
|
+
private _openai;
|
|
83
|
+
get openai(): OpenAI;
|
|
84
|
+
constructor(params?: OpenAIAdapterParams);
|
|
85
|
+
process(request: CopilotRuntimeChatCompletionRequest): Promise<CopilotRuntimeChatCompletionResponse>;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
type LangChainBaseMessageChunkStream = IterableReadableStream<BaseMessageChunk>;
|
|
89
|
+
type LangChainAIMessageChunkStream = IterableReadableStreamInterface<AIMessageChunk>;
|
|
90
|
+
type LangChainReturnType = LangChainBaseMessageChunkStream | LangChainAIMessageChunkStream | BaseMessageChunk | string | AIMessage;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Copilot Runtime adapter for LangChain.
|
|
94
|
+
*
|
|
95
|
+
* ## Example
|
|
96
|
+
*
|
|
97
|
+
* ```ts
|
|
98
|
+
* import { CopilotRuntime, LangChainAdapter } from "@copilotkit/runtime";
|
|
99
|
+
* import { ChatOpenAI } from "@langchain/openai";
|
|
100
|
+
*
|
|
101
|
+
* const copilotKit = new CopilotRuntime();
|
|
102
|
+
*
|
|
103
|
+
* const model = new ChatOpenAI({
|
|
104
|
+
* model: "gpt-4o",
|
|
105
|
+
* apiKey: "<your-api-key>",
|
|
106
|
+
* });
|
|
107
|
+
*
|
|
108
|
+
* return new LangChainAdapter({
|
|
109
|
+
* chainFn: async ({ messages, tools }) => {
|
|
110
|
+
* return model.bindTools(tools).stream(messages);
|
|
111
|
+
* // or optionally enable strict mode
|
|
112
|
+
* // return model.bindTools(tools, { strict: true }).stream(messages);
|
|
113
|
+
* }
|
|
114
|
+
* });
|
|
115
|
+
* ```
|
|
116
|
+
*
|
|
117
|
+
* The asynchronous handler function (`chainFn`) can return any of the following:
|
|
118
|
+
*
|
|
119
|
+
* - A simple `string` response
|
|
120
|
+
* - A LangChain stream (`IterableReadableStream`)
|
|
121
|
+
* - A LangChain `BaseMessageChunk` object
|
|
122
|
+
* - A LangChain `AIMessage` object
|
|
123
|
+
*/
|
|
124
|
+
|
|
125
|
+
interface ChainFnParameters {
|
|
126
|
+
model: string;
|
|
127
|
+
messages: BaseMessage[];
|
|
128
|
+
tools: DynamicStructuredTool[];
|
|
129
|
+
threadId?: string;
|
|
130
|
+
runId?: string;
|
|
131
|
+
}
|
|
132
|
+
interface LangChainAdapterOptions {
|
|
133
|
+
/**
|
|
134
|
+
* A function that uses the LangChain API to generate a response.
|
|
135
|
+
*/
|
|
136
|
+
chainFn: (parameters: ChainFnParameters) => Promise<LangChainReturnType>;
|
|
137
|
+
}
|
|
138
|
+
declare class LangChainAdapter implements CopilotServiceAdapter {
|
|
139
|
+
private options;
|
|
140
|
+
/**
|
|
141
|
+
* To use LangChain as a backend, provide a handler function to the adapter with your custom LangChain logic.
|
|
142
|
+
*/
|
|
143
|
+
constructor(options: LangChainAdapterOptions);
|
|
144
|
+
process(request: CopilotRuntimeChatCompletionRequest): Promise<CopilotRuntimeChatCompletionResponse>;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
interface GoogleGenerativeAIAdapterOptions {
|
|
148
|
+
/**
|
|
149
|
+
* A custom Google Generative AI model to use.
|
|
150
|
+
*/
|
|
151
|
+
model?: string;
|
|
152
|
+
}
|
|
153
|
+
declare class GoogleGenerativeAIAdapter extends LangChainAdapter {
|
|
154
|
+
constructor(options?: GoogleGenerativeAIAdapterOptions);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Copilot Runtime adapter for the OpenAI Assistant API.
|
|
159
|
+
*
|
|
160
|
+
* ## Example
|
|
161
|
+
*
|
|
162
|
+
* ```ts
|
|
163
|
+
* import { CopilotRuntime, OpenAIAssistantAdapter } from "@copilotkit/runtime";
|
|
164
|
+
* import OpenAI from "openai";
|
|
165
|
+
*
|
|
166
|
+
* const copilotKit = new CopilotRuntime();
|
|
167
|
+
*
|
|
168
|
+
* const openai = new OpenAI({
|
|
169
|
+
* organization: "<your-organization-id>",
|
|
170
|
+
* apiKey: "<your-api-key>",
|
|
171
|
+
* });
|
|
172
|
+
*
|
|
173
|
+
* return new OpenAIAssistantAdapter({
|
|
174
|
+
* openai,
|
|
175
|
+
* assistantId: "<your-assistant-id>",
|
|
176
|
+
* codeInterpreterEnabled: true,
|
|
177
|
+
* fileSearchEnabled: true,
|
|
178
|
+
* });
|
|
179
|
+
* ```
|
|
180
|
+
*/
|
|
181
|
+
|
|
182
|
+
interface OpenAIAssistantAdapterParams {
|
|
183
|
+
/**
|
|
184
|
+
* The ID of the assistant to use.
|
|
185
|
+
*/
|
|
186
|
+
assistantId: string;
|
|
187
|
+
/**
|
|
188
|
+
* An optional OpenAI instance to use. If not provided, a new instance will be created.
|
|
189
|
+
*/
|
|
190
|
+
openai?: OpenAI;
|
|
191
|
+
/**
|
|
192
|
+
* Whether to enable code interpretation.
|
|
193
|
+
* @default true
|
|
194
|
+
*/
|
|
195
|
+
codeInterpreterEnabled?: boolean;
|
|
196
|
+
/**
|
|
197
|
+
* Whether to enable file search.
|
|
198
|
+
* @default true
|
|
199
|
+
*/
|
|
200
|
+
fileSearchEnabled?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Whether to disable parallel tool calls.
|
|
203
|
+
* You can disable parallel tool calls to force the model to execute tool calls sequentially.
|
|
204
|
+
* This is useful if you want to execute tool calls in a specific order so that the state changes
|
|
205
|
+
* introduced by one tool call are visible to the next tool call. (i.e. new actions or readables)
|
|
206
|
+
*
|
|
207
|
+
* @default false
|
|
208
|
+
*/
|
|
209
|
+
disableParallelToolCalls?: boolean;
|
|
210
|
+
}
|
|
211
|
+
declare class OpenAIAssistantAdapter implements CopilotServiceAdapter {
|
|
212
|
+
private openai;
|
|
213
|
+
private codeInterpreterEnabled;
|
|
214
|
+
private assistantId;
|
|
215
|
+
private fileSearchEnabled;
|
|
216
|
+
private disableParallelToolCalls;
|
|
217
|
+
constructor(params: OpenAIAssistantAdapterParams);
|
|
218
|
+
process(request: CopilotRuntimeChatCompletionRequest): Promise<CopilotRuntimeChatCompletionResponse>;
|
|
219
|
+
private submitToolOutputs;
|
|
220
|
+
private submitUserMessage;
|
|
221
|
+
private streamResponse;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
interface UnifyAdapterParams {
|
|
225
|
+
apiKey?: string;
|
|
226
|
+
model: string;
|
|
227
|
+
}
|
|
228
|
+
declare class UnifyAdapter implements CopilotServiceAdapter {
|
|
229
|
+
private apiKey;
|
|
230
|
+
private model;
|
|
231
|
+
private start;
|
|
232
|
+
constructor(options?: UnifyAdapterParams);
|
|
233
|
+
process(request: CopilotRuntimeChatCompletionRequest): Promise<CopilotRuntimeChatCompletionResponse>;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Copilot Runtime adapter for Groq.
|
|
238
|
+
*
|
|
239
|
+
* ## Example
|
|
240
|
+
*
|
|
241
|
+
* ```ts
|
|
242
|
+
* import { CopilotRuntime, GroqAdapter } from "@copilotkit/runtime";
|
|
243
|
+
* import { Groq } from "groq-sdk";
|
|
244
|
+
*
|
|
245
|
+
* const groq = new Groq({ apiKey: process.env["GROQ_API_KEY"] });
|
|
246
|
+
*
|
|
247
|
+
* const copilotKit = new CopilotRuntime();
|
|
248
|
+
*
|
|
249
|
+
* return new GroqAdapter({ groq, model: "<model-name>" });
|
|
250
|
+
* ```
|
|
251
|
+
*/
|
|
252
|
+
|
|
253
|
+
interface GroqAdapterParams {
|
|
254
|
+
/**
|
|
255
|
+
* An optional Groq instance to use.
|
|
256
|
+
*/
|
|
257
|
+
groq?: Groq;
|
|
258
|
+
/**
|
|
259
|
+
* The model to use.
|
|
260
|
+
*/
|
|
261
|
+
model?: string;
|
|
262
|
+
/**
|
|
263
|
+
* Whether to disable parallel tool calls.
|
|
264
|
+
* You can disable parallel tool calls to force the model to execute tool calls sequentially.
|
|
265
|
+
* This is useful if you want to execute tool calls in a specific order so that the state changes
|
|
266
|
+
* introduced by one tool call are visible to the next tool call. (i.e. new actions or readables)
|
|
267
|
+
*
|
|
268
|
+
* @default false
|
|
269
|
+
*/
|
|
270
|
+
disableParallelToolCalls?: boolean;
|
|
271
|
+
}
|
|
272
|
+
declare class GroqAdapter implements CopilotServiceAdapter {
|
|
273
|
+
private model;
|
|
274
|
+
private disableParallelToolCalls;
|
|
275
|
+
private _groq;
|
|
276
|
+
get groq(): Groq;
|
|
277
|
+
constructor(params?: GroqAdapterParams);
|
|
278
|
+
process(request: CopilotRuntimeChatCompletionRequest): Promise<CopilotRuntimeChatCompletionResponse>;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export { GoogleGenerativeAIAdapter as G, LangChainAdapter as L, OpenAIAdapterParams as O, UnifyAdapterParams as U, OpenAIAdapter as a, OpenAIAssistantAdapterParams as b, OpenAIAssistantAdapter as c, UnifyAdapter as d, GroqAdapterParams as e, GroqAdapter as f };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { BaseMessageInput } from './graphql/types/base/index.js';
|
|
2
|
+
|
|
3
|
+
declare enum MessageRole {
|
|
4
|
+
user = "user",
|
|
5
|
+
assistant = "assistant",
|
|
6
|
+
system = "system",
|
|
7
|
+
tool = "tool"
|
|
8
|
+
}
|
|
9
|
+
declare enum ActionInputAvailability {
|
|
10
|
+
disabled = "disabled",
|
|
11
|
+
enabled = "enabled",
|
|
12
|
+
remote = "remote"
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare class MessageInput extends BaseMessageInput {
|
|
16
|
+
textMessage?: TextMessageInput;
|
|
17
|
+
actionExecutionMessage?: ActionExecutionMessageInput;
|
|
18
|
+
resultMessage?: ResultMessageInput;
|
|
19
|
+
agentStateMessage?: AgentStateMessageInput;
|
|
20
|
+
}
|
|
21
|
+
declare class TextMessageInput {
|
|
22
|
+
content: string;
|
|
23
|
+
parentMessageId?: string;
|
|
24
|
+
role: MessageRole;
|
|
25
|
+
}
|
|
26
|
+
declare class ActionExecutionMessageInput {
|
|
27
|
+
name: string;
|
|
28
|
+
arguments: string;
|
|
29
|
+
parentMessageId?: string;
|
|
30
|
+
scope?: String;
|
|
31
|
+
}
|
|
32
|
+
declare class ResultMessageInput {
|
|
33
|
+
actionExecutionId: string;
|
|
34
|
+
actionName: string;
|
|
35
|
+
parentMessageId?: string;
|
|
36
|
+
result: string;
|
|
37
|
+
}
|
|
38
|
+
declare class AgentStateMessageInput {
|
|
39
|
+
threadId: string;
|
|
40
|
+
agentName: string;
|
|
41
|
+
role: MessageRole;
|
|
42
|
+
state: string;
|
|
43
|
+
running: boolean;
|
|
44
|
+
nodeName: string;
|
|
45
|
+
runId: string;
|
|
46
|
+
active: boolean;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type MessageType = "TextMessage" | "ActionExecutionMessage" | "ResultMessage" | "AgentStateMessage";
|
|
50
|
+
declare class Message extends BaseMessageInput {
|
|
51
|
+
type: MessageType;
|
|
52
|
+
isTextMessage(): this is TextMessage;
|
|
53
|
+
isActionExecutionMessage(): this is ActionExecutionMessage;
|
|
54
|
+
isResultMessage(): this is ResultMessage;
|
|
55
|
+
isAgentStateMessage(): this is AgentStateMessage;
|
|
56
|
+
}
|
|
57
|
+
declare class TextMessage extends Message implements TextMessageInput {
|
|
58
|
+
type: MessageType;
|
|
59
|
+
content: string;
|
|
60
|
+
role: MessageRole;
|
|
61
|
+
parentMessageId?: string;
|
|
62
|
+
}
|
|
63
|
+
declare class ActionExecutionMessage extends Message implements Omit<ActionExecutionMessageInput, "arguments" | "scope"> {
|
|
64
|
+
type: MessageType;
|
|
65
|
+
name: string;
|
|
66
|
+
arguments: Record<string, any>;
|
|
67
|
+
parentMessageId?: string;
|
|
68
|
+
}
|
|
69
|
+
declare class ResultMessage extends Message implements ResultMessageInput {
|
|
70
|
+
type: MessageType;
|
|
71
|
+
actionExecutionId: string;
|
|
72
|
+
actionName: string;
|
|
73
|
+
result: string;
|
|
74
|
+
}
|
|
75
|
+
declare class AgentStateMessage extends Message implements Omit<AgentStateMessageInput, "state"> {
|
|
76
|
+
type: MessageType;
|
|
77
|
+
threadId: string;
|
|
78
|
+
agentName: string;
|
|
79
|
+
nodeName: string;
|
|
80
|
+
runId: string;
|
|
81
|
+
active: boolean;
|
|
82
|
+
role: MessageRole;
|
|
83
|
+
state: any;
|
|
84
|
+
running: boolean;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { ActionInputAvailability as A, Message as M, ResultMessage as R, TextMessage as T, MessageInput as a, MessageType as b, ActionExecutionMessage as c, AgentStateMessage as d };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
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-36700e00.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-696b5d29.js';
|
|
3
|
+
export { CopilotRuntimeServerInstance, config, copilotRuntimeNextJSAppRouterEndpoint, copilotRuntimeNextJSPagesRouterEndpoint } from './lib/integrations/index.js';
|
|
4
|
+
export { copilotRuntimeNodeHttpEndpoint } from './lib/integrations/node-http/index.js';
|
|
5
|
+
export { copilotRuntimeNodeExpressEndpoint } from './lib/integrations/node-express/index.js';
|
|
6
|
+
export { copilotRuntimeNestEndpoint } from './lib/integrations/nest/index.js';
|
|
7
|
+
export { GuardrailsValidationFailureResponse, MessageStreamInterruptedResponse, UnknownErrorResponse } from './utils/index.js';
|
|
8
|
+
export { C as CopilotRuntimeChatCompletionRequest, a as CopilotRuntimeChatCompletionResponse, b as CopilotServiceAdapter, c as RemoteChain, R as RemoteChainParameters } from './langserve-9125a12e.js';
|
|
9
|
+
export { AnthropicAdapter, AnthropicAdapterParams, ExperimentalEmptyAdapter, ExperimentalOllamaAdapter } from './service-adapters/index.js';
|
|
10
|
+
import '@copilotkit/shared';
|
|
11
|
+
import './index-cc2b17be.js';
|
|
12
|
+
import './graphql/types/base/index.js';
|
|
13
|
+
import 'graphql';
|
|
14
|
+
import 'pino';
|
|
15
|
+
import 'graphql-yoga';
|
|
16
|
+
import './lib/cloud/index.js';
|
|
17
|
+
import 'openai';
|
|
18
|
+
import '@langchain/core/messages';
|
|
19
|
+
import '@langchain/core/tools';
|
|
20
|
+
import '@langchain/core/utils/stream';
|
|
21
|
+
import 'groq-sdk';
|
|
22
|
+
import 'rxjs';
|
|
23
|
+
import '@anthropic-ai/sdk';
|