UNPKG

@lobehub/chat-plugin-sdk

Version:

Lobe Chat Plugin SDK, help you to build an amazing chat plugin for Lobe Chat

26 lines 723 B
import { z } from 'zod'; import { pluginManifestSchema } from "./manifest"; export var pluginMetaSchema = z.object({ author: z.string(), createdAt: z.string(), homepage: z.string(), identifier: z.string(), manifest: z.string(), meta: z.object({ avatar: z.string().optional(), tags: z.array(z.string()).optional() }), schemaVersion: z.number() }); export var marketIndexSchema = z.object({ plugins: z.array(z.any()), schemaVersion: z.number() }); export var pluginRequestPayloadSchema = z.object({ apiName: z.string(), arguments: z.string().optional(), identifier: z.string(), indexUrl: z.string().optional(), manifest: pluginManifestSchema.optional(), type: z.string().optional() });