@assistant-ui/react
Version:
React components for AI chat.
24 lines • 1.12 kB
TypeScript
import { ChatModelAdapter, ChatModelRunOptions } from "../local/ChatModelAdapter";
import { ChatModelRunResult } from "../local/ChatModelAdapter";
export declare function asAsyncIterable<T>(source: ReadableStream<T>): AsyncIterable<T>;
export type EdgeChatAdapterOptions = {
api: string;
credentials?: RequestCredentials;
headers?: Record<string, string> | Headers;
body?: object;
/**
* When enabled, the adapter will not strip `id` from messages in the messages array.
*/
unstable_sendMessageIds?: boolean;
/**
* When enabled, the adapter will send messages in the format expected by the Vercel AI SDK Core.
* This feature will be removed in the future in favor of a better solution.
*/
unstable_AISDKInterop?: boolean | undefined;
};
export declare class EdgeChatAdapter implements ChatModelAdapter {
private options;
constructor(options: EdgeChatAdapterOptions);
run({ messages, abortSignal, config, unstable_assistantMessageId, }: ChatModelRunOptions): AsyncGenerator<ChatModelRunResult, void, unknown>;
}
//# sourceMappingURL=EdgeChatAdapter.d.ts.map