UNPKG

@assistant-ui/react

Version:

React components for AI chat.

37 lines 1.75 kB
import type { CoreMessage } from "../../types"; import { AttachmentAdapter } from "../attachment/AttachmentAdapter"; import { FeedbackAdapter } from "../feedback/FeedbackAdapter"; import { SpeechSynthesisAdapter } from "../speech/SpeechAdapterTypes"; import { ChatModelAdapter } from "./ChatModelAdapter"; export type LocalRuntimeOptionsBase = { maxSteps?: number | undefined; /** * @deprecated Use `maxSteps` (which is `maxToolRoundtrips` + 1; if you set `maxToolRoundtrips` to 2, set `maxSteps` to 3) instead. This field will be removed in v0.6. */ maxToolRoundtrips?: number | undefined; adapters: { chatModel: ChatModelAdapter; attachments?: AttachmentAdapter | undefined; speech?: SpeechSynthesisAdapter | undefined; feedback?: FeedbackAdapter | undefined; }; }; export type LocalRuntimeOptions = Omit<LocalRuntimeOptionsBase, "adapters"> & { initialMessages?: readonly CoreMessage[] | undefined; adapters?: Omit<LocalRuntimeOptionsBase["adapters"], "chatModel"> | undefined; }; export declare const splitLocalRuntimeOptions: <T extends LocalRuntimeOptions>(options: T) => { localRuntimeOptions: { initialMessages: readonly CoreMessage[] | undefined; maxToolRoundtrips: number | undefined; maxSteps: number | undefined; adapters: Omit<{ chatModel: ChatModelAdapter; attachments?: AttachmentAdapter | undefined; speech?: SpeechSynthesisAdapter | undefined; feedback?: FeedbackAdapter | undefined; }, "chatModel"> | undefined; }; otherOptions: Omit<T, "adapters" | "maxSteps" | "maxToolRoundtrips" | "initialMessages">; }; //# sourceMappingURL=LocalRuntimeOptions.d.ts.map