Skip to content

Latest commit

 

History

History
66 lines (46 loc) · 1.61 KB

File metadata and controls

66 lines (46 loc) · 1.61 KB

import { PropertyReference, LinkToCopilotCloud } from "@/components";

import { Tabs } from "nextra/components";

import { Callout } from "nextra/components";

CopilotRuntime

This is the reference for the `CopilotRuntime` class. For more information and example code snippets, please see [Concept: Copilot Runtime](/concepts/copilot-runtime).

Usage

import { CopilotRuntime } from "@copilotkit/runtime";
 
const copilotKit = new CopilotRuntime();

Constructor Parameters

Middleware to be used by the runtime.
onBeforeRequest: (options: {
  threadId?: string;
  runId?: string;
  inputMessages: Message[];
  properties: any;
}) => void | Promise<void>;
onAfterRequest: (options: {
  threadId?: string;
  runId?: string;
  inputMessages: Message[];
  outputMessages: Message[];
  properties: any;
}) => void | Promise<void>;
A list of server side actions that can be executed. A list of remote actions that can be executed. An array of LangServer URLs.