Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1.19 KB

File metadata and controls

47 lines (33 loc) · 1.19 KB
title OpenAIAssistantAdapter
description CopilotKit Adapter for the OpenAI Assistant API.

{/* GENERATE-DOCS path=packages/runtime/src/service-adapters/openai/openai-assistant-adapter.ts class=OpenAIAssistantAdapter */}

Use this adapter to get responses from the OpenAI Assistant API.

```typescript const copilotKit = new CopilotRuntime(); return copilotKit.response( req, new OpenAIAssistantAdapter({ assistantId: "your-assistant-id" }) ); ```

Constructor

The ID of the assistant to use. An instance of `OpenAI` to use for the request. If not provided, a new instance will be created. Whether to enable the code interpreter. Defaults to `true`. Whether to enable retrieval. Defaults to `true`.

process(request: CopilotRuntimeChatCompletionRequest)