UNPKG

@directus/api

Version:

Directus is a real-time API and App dashboard for managing SQL database content

168 lines (167 loc) 6.85 kB
import { type JSONSchema7 } from 'ai'; import { z } from 'zod'; export declare const ChatRequestTool: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{ name: z.ZodString; description: z.ZodString; inputSchema: z.ZodCustom<JSONSchema7, JSONSchema7>; }, z.core.$strip>]>; export type ChatRequestTool = z.infer<typeof ChatRequestTool>; export declare const ToolApprovalMode: z.ZodEnum<{ always: "always"; ask: "ask"; disabled: "disabled"; }>; export type ToolApprovalMode = z.infer<typeof ToolApprovalMode>; export declare const ContextAttachment: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"item">; display: z.ZodString; data: z.ZodObject<{ collection: z.ZodString; key: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>; }, z.core.$strip>; snapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"visual-element">; display: z.ZodString; data: z.ZodObject<{ key: z.ZodString; collection: z.ZodString; item: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>; fields: z.ZodOptional<z.ZodArray<z.ZodString>>; rect: z.ZodOptional<z.ZodObject<{ top: z.ZodNumber; left: z.ZodNumber; width: z.ZodNumber; height: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>; snapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"prompt">; display: z.ZodString; data: z.ZodObject<{ text: z.ZodString; prompt: z.ZodRecord<z.ZodString, z.ZodUnknown>; values: z.ZodRecord<z.ZodString, z.ZodString>; }, z.core.$strip>; snapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>; }, z.core.$strip>], "type">; export type ContextAttachment = z.infer<typeof ContextAttachment>; export declare const PageContext: z.ZodObject<{ path: z.ZodString; collection: z.ZodOptional<z.ZodString>; item: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>; module: z.ZodOptional<z.ZodString>; }, z.core.$strip>; export type PageContext = z.infer<typeof PageContext>; export declare const ChatContext: z.ZodObject<{ attachments: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"item">; display: z.ZodString; data: z.ZodObject<{ collection: z.ZodString; key: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>; }, z.core.$strip>; snapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"visual-element">; display: z.ZodString; data: z.ZodObject<{ key: z.ZodString; collection: z.ZodString; item: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>; fields: z.ZodOptional<z.ZodArray<z.ZodString>>; rect: z.ZodOptional<z.ZodObject<{ top: z.ZodNumber; left: z.ZodNumber; width: z.ZodNumber; height: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>; snapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"prompt">; display: z.ZodString; data: z.ZodObject<{ text: z.ZodString; prompt: z.ZodRecord<z.ZodString, z.ZodUnknown>; values: z.ZodRecord<z.ZodString, z.ZodString>; }, z.core.$strip>; snapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>; }, z.core.$strip>], "type">>>; page: z.ZodOptional<z.ZodObject<{ path: z.ZodString; collection: z.ZodOptional<z.ZodString>; item: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>; module: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; }, z.core.$strip>; export type ChatContext = z.infer<typeof ChatContext>; export declare const ChatRequest: z.ZodIntersection<z.ZodDiscriminatedUnion<[z.ZodObject<{ provider: z.ZodLiteral<"openai">; model: z.ZodString; }, z.core.$strip>, z.ZodObject<{ provider: z.ZodLiteral<"anthropic">; model: z.ZodString; }, z.core.$strip>, z.ZodObject<{ provider: z.ZodLiteral<"google">; model: z.ZodString; }, z.core.$strip>, z.ZodObject<{ provider: z.ZodLiteral<"openai-compatible">; model: z.ZodString; }, z.core.$strip>], "provider">, z.ZodObject<{ tools: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{ name: z.ZodString; description: z.ZodString; inputSchema: z.ZodCustom<JSONSchema7, JSONSchema7>; }, z.core.$strip>]>>; messages: z.ZodArray<z.ZodObject<{}, z.core.$loose>>; toolApprovals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{ always: "always"; ask: "ask"; disabled: "disabled"; }>>>; context: z.ZodOptional<z.ZodObject<{ attachments: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"item">; display: z.ZodString; data: z.ZodObject<{ collection: z.ZodString; key: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>; }, z.core.$strip>; snapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"visual-element">; display: z.ZodString; data: z.ZodObject<{ key: z.ZodString; collection: z.ZodString; item: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>; fields: z.ZodOptional<z.ZodArray<z.ZodString>>; rect: z.ZodOptional<z.ZodObject<{ top: z.ZodNumber; left: z.ZodNumber; width: z.ZodNumber; height: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>; snapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"prompt">; display: z.ZodString; data: z.ZodObject<{ text: z.ZodString; prompt: z.ZodRecord<z.ZodString, z.ZodUnknown>; values: z.ZodRecord<z.ZodString, z.ZodString>; }, z.core.$strip>; snapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>; }, z.core.$strip>], "type">>>; page: z.ZodOptional<z.ZodObject<{ path: z.ZodString; collection: z.ZodOptional<z.ZodString>; item: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>; module: z.ZodOptional<z.ZodString>; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>>; export type ChatRequest = z.infer<typeof ChatRequest>;