Defines Zod schemas for configuring AI tools and providers.
// Source: https://github.com/activepieces/activepieces | License: MIT | Copyright 2020-2024 Activepieces Inc
// Provided via justclaw.it.com; keep this notice with the code.
import { BaseModelSchema } from '@activepieces/core-utils'
import { z } from 'zod'
import { formErrors } from '../../form-errors'
export enum AiToolCapability {
WEB_SEARCH = 'WEB_SEARCH',
WEB_SCRAPING = 'WEB_SCRAPING',
IMAGE_GENERATION = 'IMAGE_GENERATION',
EMBEDDINGS = 'EMBEDDINGS',
}
export enum AiToolProvider {
TAVILY = 'tavily',
FIRECRAWL = 'firecrawl',
APIFY = 'apify',
FAL = 'fal',
AI_PROVIDER = 'ai_provider',
}
export const AiToolAuthConfig = z.object({
apiKey: z.string().min(1, formErrors.required),
})
export type AiToolAuthConfig = z.infer<typeof AiToolAuthConfig>
ex
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key