Skip to content

Commit 59de133

Browse files
authored
fix: rename ExperimentalEmptyAdapter to EmptyAdapter (CopilotKit#1253)
1 parent f6b903c commit 59de133

5 files changed

Lines changed: 18 additions & 11 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@copilotkit/runtime": patch
3+
---
4+
5+
- fix: rename ExperimentalEmptyAdapter to EmptyAdapter

CopilotKit/packages/runtime/src/lib/runtime/copilot-runtime.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import { Action, actionParametersToJsonSchema, Parameter, randomId } from "@copilotkit/shared";
1616
import {
1717
CopilotServiceAdapter,
18-
ExperimentalEmptyAdapter,
18+
EmptyAdapter,
1919
RemoteChain,
2020
RemoteChainParameters,
2121
} from "../../service-adapters";
@@ -189,9 +189,9 @@ export class CopilotRuntime<const T extends Parameter[] | [] = []> {
189189
if (agentSession) {
190190
return await this.processAgentRequest(request);
191191
}
192-
if (serviceAdapter instanceof ExperimentalEmptyAdapter) {
192+
if (serviceAdapter instanceof EmptyAdapter) {
193193
// TODO: use CPK error here
194-
throw new Error(`Invalid adapter configuration: ExperimentalEmptyAdapter is only meant to be used with agent lock mode.
194+
throw new Error(`Invalid adapter configuration: EmptyAdapter is only meant to be used with agent lock mode.
195195
For non-agent components like useCopilotChatSuggestions, CopilotTextarea, or CopilotTask,
196196
please use an LLM adapter instead.`);
197197
}

CopilotKit/packages/runtime/src/service-adapters/experimental/empty/empty-adapter.ts renamed to CopilotKit/packages/runtime/src/service-adapters/empty/empty-adapter.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@
88
* ## Example
99
*
1010
* ```ts
11-
* import { CopilotRuntime, ExperimentalEmptyAdapter } from "@copilotkit/runtime";
11+
* import { CopilotRuntime, EmptyAdapter } from "@copilotkit/runtime";
1212
*
1313
* const copilotKit = new CopilotRuntime();
1414
*
15-
* return new ExperimentalEmptyAdapter();
15+
* return new EmptyAdapter();
1616
* ```
1717
*/
1818
import {
1919
CopilotServiceAdapter,
2020
CopilotRuntimeChatCompletionRequest,
2121
CopilotRuntimeChatCompletionResponse,
22-
} from "../../service-adapter";
22+
} from "../service-adapter";
2323
import { randomId } from "@copilotkit/shared";
2424

25-
export class ExperimentalEmptyAdapter implements CopilotServiceAdapter {
25+
export class EmptyAdapter implements CopilotServiceAdapter {
2626
async process(
2727
request: CopilotRuntimeChatCompletionRequest,
2828
): Promise<CopilotRuntimeChatCompletionResponse> {
@@ -31,3 +31,5 @@ export class ExperimentalEmptyAdapter implements CopilotServiceAdapter {
3131
};
3232
}
3333
}
34+
35+
export const ExperimentalEmptyAdapter = EmptyAdapter;

CopilotKit/packages/runtime/src/service-adapters/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ export * from "./unify/unify-adapter";
1313
export * from "./groq/groq-adapter";
1414
export * from "./anthropic/anthropic-adapter";
1515
export * from "./experimental/ollama/ollama-adapter";
16-
export * from "./experimental/empty/empty-adapter";
16+
export * from "./empty/empty-adapter";

docs/components/react/multi-provider-content/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ export const quickStartProviders: ProvidersConfig = {
104104
},
105105
"empty": {
106106
id: "empty",
107-
title: "Experimental Empty Adapter",
107+
title: "Empty Adapter (CoAgents Only)",
108108
icon: '/icons/empty.svg',
109-
adapterImport: "ExperimentalEmptyAdapter",
110-
adapterSetup: 'const serviceAdapter = new ExperimentalEmptyAdapter();'
109+
adapterImport: "EmptyAdapter",
110+
adapterSetup: 'const serviceAdapter = new EmptyAdapter();'
111111
},
112112
};

0 commit comments

Comments
 (0)