import OpenAI from 'openai';
import { CopilotKitServiceAdapter, CopilotKitResponse } from '../types/service-adapter.js';
/**
* CopilotKit Adapter for the OpenAI Assistant API.
*
* 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"
* })
* );
* ```
*
*/
interface OpenAIAssistantAdapterParams {
/**
* The ID of the assistant to use.
*/
assistantId: string;
/**
* An instance of `OpenAI` to use for the request. If not provided, a new instance will be created.
*/
openai?: OpenAI;
/**
* Whether to enable the code interpreter. Defaults to `true`.
*/
codeInterpreterEnabled?: boolean;
/**
* Whether to enable retrieval. Defaults to `true`.
*/
retrievalEnabled?: boolean;
}
declare class OpenAIAssistantAdapter implements CopilotKitServiceAdapter {
private openai;
private codeInterpreterEnabled;
private assistantId;
private retrievalEnabled;
constructor(params: OpenAIAssistantAdapterParams);
private waitForRun;
private submitToolOutputs;
private submitUserMessage;
getResponse(forwardedProps: any): Promise;
}
export { OpenAIAssistantAdapter, OpenAIAssistantAdapterParams };