| title | OpenAIAssistantAdapter |
|---|---|
| description | Copilot Runtime adapter for OpenAI Assistant API. |
{ /*
- ATTENTION! DO NOT MODIFY THIS FILE!
- This page is auto-generated. If you want to make any changes to this page, changes must be made at:
- packages/runtime/src/service-adapters/openai/openai-assistant-adapter.ts */ } Copilot Runtime adapter for the OpenAI Assistant API.
import { CopilotRuntime, OpenAIAssistantAdapter } from "@copilotkit/runtime";
import OpenAI from "openai";
const copilotKit = new CopilotRuntime();
const openai = new OpenAI({
organization: "<your-organization-id>",
apiKey: "<your-api-key>",
});
return new OpenAIAssistantAdapter({
openai,
assistantId: "<your-assistant-id>",
codeInterpreterEnabled: true,
fileSearchEnabled: true,
});