UNPKG

@assistant-ui/react

Version:

Typescript/React library for AI Chat

345 lines 10.5 kB
import { JSONSchema7 } from "json-schema"; import { z } from "zod"; import { ReadonlyJSONObject } from "../../utils/json/json-value"; export declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{ system: z.ZodOptional<z.ZodString>; messages: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{ role: z.ZodLiteral<"system">; content: z.ZodReadonly<z.ZodTuple<[z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodString; }, "strip", z.ZodTypeAny, { text: string; type: "text"; }, { text: string; type: "text"; }>], null>>; }, "strip", z.ZodTypeAny, { role: "system"; content: readonly [{ text: string; type: "text"; }]; }, { role: "system"; content: readonly [{ text: string; type: "text"; }]; }>, z.ZodObject<{ role: z.ZodLiteral<"user">; content: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodString; }, "strip", z.ZodTypeAny, { text: string; type: "text"; }, { text: string; type: "text"; }>, z.ZodObject<{ type: z.ZodLiteral<"image">; image: z.ZodString; }, "strip", z.ZodTypeAny, { image: string; type: "image"; }, { image: string; type: "image"; }>, z.ZodObject<{ type: z.ZodLiteral<"file">; data: z.ZodString; mimeType: z.ZodString; }, "strip", z.ZodTypeAny, { type: "file"; data: string; mimeType: string; }, { type: "file"; data: string; mimeType: string; }>, z.ZodObject<{ type: z.ZodLiteral<"audio">; audio: z.ZodObject<{ data: z.ZodString; format: z.ZodUnion<[z.ZodLiteral<"mp3">, z.ZodLiteral<"wav">]>; }, "strip", z.ZodTypeAny, { data: string; format: "mp3" | "wav"; }, { data: string; format: "mp3" | "wav"; }>; }, "strip", z.ZodTypeAny, { audio: { data: string; format: "mp3" | "wav"; }; type: "audio"; }, { audio: { data: string; format: "mp3" | "wav"; }; type: "audio"; }>]>, "many">>; }, "strip", z.ZodTypeAny, { role: "user"; content: readonly ({ text: string; type: "text"; } | { image: string; type: "image"; } | { type: "file"; data: string; mimeType: string; } | { audio: { data: string; format: "mp3" | "wav"; }; type: "audio"; })[]; }, { role: "user"; content: readonly ({ text: string; type: "text"; } | { image: string; type: "image"; } | { type: "file"; data: string; mimeType: string; } | { audio: { data: string; format: "mp3" | "wav"; }; type: "audio"; })[]; }>, z.ZodObject<{ role: z.ZodLiteral<"assistant">; content: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodString; }, "strip", z.ZodTypeAny, { text: string; type: "text"; }, { text: string; type: "text"; }>, z.ZodObject<{ type: z.ZodLiteral<"tool-call">; toolCallId: z.ZodString; toolName: z.ZodString; args: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, ReadonlyJSONObject, Record<string, unknown>>; result: z.ZodOptional<z.ZodUnknown>; isError: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { type: "tool-call"; toolCallId: string; toolName: string; args: ReadonlyJSONObject; result?: unknown; isError?: boolean | undefined; }, { type: "tool-call"; toolCallId: string; toolName: string; args: Record<string, unknown>; result?: unknown; isError?: boolean | undefined; }>]>, "many">>; }, "strip", z.ZodTypeAny, { role: "assistant"; content: readonly ({ text: string; type: "text"; } | { type: "tool-call"; toolCallId: string; toolName: string; args: ReadonlyJSONObject; result?: unknown; isError?: boolean | undefined; })[]; }, { role: "assistant"; content: readonly ({ text: string; type: "text"; } | { type: "tool-call"; toolCallId: string; toolName: string; args: Record<string, unknown>; result?: unknown; isError?: boolean | undefined; })[]; }>]>, "many">>; runConfig: z.ZodOptional<z.ZodObject<{ custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { custom?: Record<string, unknown> | undefined; }, { custom?: Record<string, unknown> | undefined; }>>; tools: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{ type: z.ZodLiteral<"function">; name: z.ZodString; description: z.ZodOptional<z.ZodString>; parameters: z.ZodType<JSONSchema7, z.ZodTypeDef, JSONSchema7>; }, "strip", z.ZodTypeAny, { type: "function"; name: string; parameters: JSONSchema7; description?: string | undefined; }, { type: "function"; name: string; parameters: JSONSchema7; description?: string | undefined; }>, "many">>>; unstable_assistantMessageId: z.ZodOptional<z.ZodString>; }, { maxTokens: z.ZodOptional<z.ZodNumber>; temperature: z.ZodOptional<z.ZodNumber>; topP: z.ZodOptional<z.ZodNumber>; presencePenalty: z.ZodOptional<z.ZodNumber>; frequencyPenalty: z.ZodOptional<z.ZodNumber>; seed: z.ZodOptional<z.ZodNumber>; headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>; }>, { apiKey: z.ZodOptional<z.ZodString>; baseUrl: z.ZodOptional<z.ZodString>; modelName: z.ZodOptional<z.ZodString>; }>, "strip", z.ZodTypeAny, { messages: readonly ({ role: "user"; content: readonly ({ text: string; type: "text"; } | { image: string; type: "image"; } | { type: "file"; data: string; mimeType: string; } | { audio: { data: string; format: "mp3" | "wav"; }; type: "audio"; })[]; } | { role: "assistant"; content: readonly ({ text: string; type: "text"; } | { type: "tool-call"; toolCallId: string; toolName: string; args: ReadonlyJSONObject; result?: unknown; isError?: boolean | undefined; })[]; } | { role: "system"; content: readonly [{ text: string; type: "text"; }]; })[]; system?: string | undefined; maxTokens?: number | undefined; temperature?: number | undefined; topP?: number | undefined; presencePenalty?: number | undefined; frequencyPenalty?: number | undefined; seed?: number | undefined; headers?: Record<string, string | undefined> | undefined; apiKey?: string | undefined; baseUrl?: string | undefined; modelName?: string | undefined; runConfig?: { custom?: Record<string, unknown> | undefined; } | undefined; tools?: readonly { type: "function"; name: string; parameters: JSONSchema7; description?: string | undefined; }[] | undefined; unstable_assistantMessageId?: string | undefined; }, { messages: readonly ({ role: "user"; content: readonly ({ text: string; type: "text"; } | { image: string; type: "image"; } | { type: "file"; data: string; mimeType: string; } | { audio: { data: string; format: "mp3" | "wav"; }; type: "audio"; })[]; } | { role: "assistant"; content: readonly ({ text: string; type: "text"; } | { type: "tool-call"; toolCallId: string; toolName: string; args: Record<string, unknown>; result?: unknown; isError?: boolean | undefined; })[]; } | { role: "system"; content: readonly [{ text: string; type: "text"; }]; })[]; system?: string | undefined; maxTokens?: number | undefined; temperature?: number | undefined; topP?: number | undefined; presencePenalty?: number | undefined; frequencyPenalty?: number | undefined; seed?: number | undefined; headers?: Record<string, string | undefined> | undefined; apiKey?: string | undefined; baseUrl?: string | undefined; modelName?: string | undefined; runConfig?: { custom?: Record<string, unknown> | undefined; } | undefined; tools?: readonly { type: "function"; name: string; parameters: JSONSchema7; description?: string | undefined; }[] | undefined; unstable_assistantMessageId?: string | undefined; }>; export type EdgeRuntimeRequestOptions = z.infer<typeof EdgeRuntimeRequestOptionsSchema>; //# sourceMappingURL=EdgeRuntimeRequestOptions.d.ts.map