AI Completions
Payload plugin that generates field content through OpenAI chat completions from the admin panel.
Installation
pnpm add @mycast-ai/payload-plugin-ai-completions About
AI Completions adds OpenAI-powered text generation to Payload collection edit views. You register collections and field paths in the plugin config, each paired with a prompt, and the plugin injects a generate button next to those fields plus a sidebar panel for batch operations. Generation runs through a custom collection endpoint (`POST /:id/admin/generate-content`) that proxies the request body straight to OpenAI's `chat.completions.create`. The server reads the API key from `OPENAI_API_KEY`, so no credentials are exposed to the browser. Default model parameters (model, temperature, frequency penalty, presence penalty, max tokens) are set globally and can be overridden per field in later revisions. Field support covers `text`, `textarea`, `richtext`, `code`, `date`, `email`, `group`, `tabs`, and `collapsible`. Nested groups and named tabs are traversed with a dotted path, so a prompt can target `author.bio` inside a group. Each collection can supply a context rule: an allowlist, a denylist, or `omitAllFields` to control which sibling field values are sent to the model as context. The plugin targets Payload 1.x and is marked as a work in progress in the README. The dashboard panel exposes a minimalistic UI toggle, a default-collapsed state, and a "Complete All" action that fills every configured field in one pass.
Package info
- Package name
@mycast-ai/payload-plugin-ai-completions- Latest version
0.0.1- Unpacked size
- 96 kB
- License
- MIT
- Weekly downloads
- 12
- Last publish
- Sep 20, 2023
Similar plugins
More in AIAI
Generates and stores vector embeddings for Payload fields using the OpenAI or NLP Cloud APIs.
AI Localization
Provides AI-powered content translation for Payload CMS using OpenAI.
AI control panel
A configuration-driven AI control panel for managing Payload CMS content.
Agent
AI chat agent for Payload CMS that works through Telegram, Slack, WhatsApp, and more.
AI Plugin
Integrates AI capabilities for content generation in Payload CMS.