UNPKG

@gensx/vercel-ai-sdk

Version:
26 lines 1.63 kB
import type { z } from "zod"; import * as gensx from "@gensx/core"; import { GsxComponent } from "@gensx/core"; import * as ai from "ai"; export declare function createGSXComponent<TFn extends (...args: any[]) => any>(name: string, fn: TFn): gensx.GsxComponent<Parameters<TFn>[0], Awaited<ReturnType<TFn>>>; type StreamObjectType = gensx.GsxComponent<Omit<Parameters<typeof ai.streamObject>[0], "output"> & { output?: "object" | "array" | "no-schema"; schema?: z.ZodType | { _type: unknown; }; }, Awaited<ReturnType<typeof ai.streamObject>>>; export declare const StreamObject: StreamObjectType; export declare const StreamText: GsxComponent<Parameters<typeof ai.streamText>[0], Awaited<ReturnType<typeof ai.streamText>>>; export declare const GenerateText: GsxComponent<Parameters<typeof ai.generateText>[0], Awaited<ReturnType<typeof ai.generateText>>>; type GenerateObjectType = GsxComponent<Omit<Parameters<typeof ai.generateObject>[0], "output"> & { output?: "object" | "array" | "no-schema"; schema?: z.ZodType | { _type: unknown; }; }, Awaited<ReturnType<typeof ai.generateObject>>>; export declare const GenerateObject: GenerateObjectType; export declare const Embed: GsxComponent<Parameters<typeof ai.embed>[0], Awaited<ReturnType<typeof ai.embed>>>; export declare const EmbedMany: GsxComponent<Parameters<typeof ai.embedMany>[0], Awaited<ReturnType<typeof ai.embedMany>>>; export declare const GenerateImage: GsxComponent<Parameters<typeof ai.experimental_generateImage>[0], Awaited<ReturnType<typeof ai.experimental_generateImage>>>; export {}; //# sourceMappingURL=index.d.ts.map