@copilotkit/runtime
Version:
<img src="https://github.com/user-attachments/assets/0a6b64d9-e193-4940-a3f6-60334ac34084" alt="banner" style="border-radius: 12px; border: 2px solid #d6d4fa;" />
47 lines (45 loc) • 1.8 kB
text/typescript
import { MaybePromise } from "@copilotkit/shared";
import { RunAgentInput } from "@ag-ui/client";
//#region src/v2/runtime/core/learning.d.ts
/** Application user resolved by an Intelligence runtime. */
interface CopilotRuntimeUser {
readonly id: string;
readonly name: string;
}
/** Context for choosing a Learning Container through the public Intelligence SDK. */
type LearningContainerSelectorInput = {
readonly surface: "web";
readonly user: CopilotRuntimeUser;
readonly agentId: string;
readonly input: Readonly<RunAgentInput>;
} | {
readonly surface: "channel";
readonly user: CopilotRuntimeUser | null;
readonly agentId: string;
readonly input: Readonly<RunAgentInput>;
};
/** Chooses one developer-created Learning Container for an Intelligence run. */
type GetLearningContainerId = (input: LearningContainerSelectorInput) => MaybePromise<string | null | undefined>;
/** Context for choosing one Learning Container for an Intelligence run. */
type CopilotRuntimeLearningContext = {
readonly surface: "web";
readonly request: Request;
readonly threadId: string;
readonly runId: string;
readonly agentId: string;
readonly userId: string;
} | {
readonly surface: "channel";
readonly threadId: string;
readonly runId: string;
readonly agentId: string;
readonly userId: string;
readonly deliveryId: string;
};
/** Assigns each Intelligence Thread to one developer-created Learning Container. */
interface CopilotRuntimeLearningConfig {
readonly containerId: string | ((input: CopilotRuntimeLearningContext) => MaybePromise<string | null | undefined>);
}
//#endregion
export { CopilotRuntimeLearningConfig, CopilotRuntimeLearningContext, CopilotRuntimeUser, GetLearningContainerId, LearningContainerSelectorInput };
//# sourceMappingURL=learning.d.mts.map