UNPKG

@assistant-ui/react

Version:

TypeScript/React library for AI Chat

48 lines 2.44 kB
import type { ThreadHistoryAdapter } from "../adapters/thread-history/ThreadHistoryAdapter.js"; import type { AttachmentAdapter } from "../adapters/attachment/AttachmentAdapter.js"; import type { ThreadMessageLike } from "../external-store/index.js"; import type { FeedbackAdapter } from "../adapters/feedback/FeedbackAdapter.js"; import type { SpeechSynthesisAdapter, DictationAdapter } from "../adapters/speech/SpeechAdapterTypes.js"; import type { ChatModelAdapter } from "./ChatModelAdapter.js"; import type { AssistantCloud } from "assistant-cloud"; import type { SuggestionAdapter } from "../adapters/index.js"; export type LocalRuntimeOptionsBase = { maxSteps?: number | undefined; adapters: { chatModel: ChatModelAdapter; history?: ThreadHistoryAdapter | undefined; attachments?: AttachmentAdapter | undefined; speech?: SpeechSynthesisAdapter | undefined; dictation?: DictationAdapter | undefined; feedback?: FeedbackAdapter | undefined; suggestion?: SuggestionAdapter | undefined; }; /** * Names of tools that are allowed to interrupt the run in order to wait for human/external approval. */ unstable_humanToolNames?: string[] | undefined; }; export type LocalRuntimeOptions = Omit<LocalRuntimeOptionsBase, "adapters"> & { cloud?: AssistantCloud | undefined; initialMessages?: readonly ThreadMessageLike[] | undefined; adapters?: Omit<LocalRuntimeOptionsBase["adapters"], "chatModel"> | undefined; }; export declare const splitLocalRuntimeOptions: <T extends LocalRuntimeOptions>(options: T) => { localRuntimeOptions: { cloud: AssistantCloud | undefined; initialMessages: readonly ThreadMessageLike[] | undefined; maxSteps: number | undefined; adapters: Omit<{ chatModel: ChatModelAdapter; history?: ThreadHistoryAdapter | undefined; attachments?: AttachmentAdapter | undefined; speech?: SpeechSynthesisAdapter | undefined; dictation?: DictationAdapter | undefined; feedback?: FeedbackAdapter | undefined; suggestion?: SuggestionAdapter | undefined; }, "chatModel"> | undefined; unstable_humanToolNames: string[] | undefined; }; otherOptions: Omit<T, "adapters" | "maxSteps" | "unstable_humanToolNames" | "cloud" | "initialMessages">; }; //# sourceMappingURL=LocalRuntimeOptions.d.ts.map