@ai-stack/payloadcms 3.68.0-beta.2 → 3.68.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/core/media/image/generateImage.js +2 -6
- package/dist/ai/core/media/image/generateImage.js.map +1 -1
- package/dist/ai/prompts.d.ts +1 -2
- package/dist/ai/prompts.js +0 -110
- package/dist/ai/prompts.js.map +1 -1
- package/dist/ai/providers/blocks/elevenlabs.js +1 -1
- package/dist/ai/providers/blocks/elevenlabs.js.map +1 -1
- package/dist/ai/providers/blocks/google.js +9 -5
- package/dist/ai/providers/blocks/google.js.map +1 -1
- package/dist/ai/providers/blocks/openai.js +1 -1
- package/dist/ai/providers/blocks/openai.js.map +1 -1
- package/dist/ai/providers/registry.js +0 -1
- package/dist/ai/providers/registry.js.map +1 -1
- package/dist/ai/utils/filterEditorSchemaByNodes.d.ts +9 -0
- package/dist/ai/utils/filterEditorSchemaByNodes.js +30 -3
- package/dist/ai/utils/filterEditorSchemaByNodes.js.map +1 -1
- package/dist/ai/utils/nodeToSchemaMap.d.ts +22 -0
- package/dist/ai/utils/nodeToSchemaMap.js +72 -0
- package/dist/ai/utils/nodeToSchemaMap.js.map +1 -0
- package/dist/collections/AISettings.js +44 -17
- package/dist/collections/AISettings.js.map +1 -1
- package/dist/defaults.d.ts +1 -0
- package/dist/defaults.js +8 -0
- package/dist/defaults.js.map +1 -1
- package/dist/endpoints/fetchFields.js +10 -0
- package/dist/endpoints/fetchFields.js.map +1 -1
- package/dist/endpoints/index.js +12 -0
- package/dist/endpoints/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +16 -32
- package/dist/plugin.js.map +1 -1
- package/dist/providers/InstructionsProvider/InstructionsProvider.js +44 -15
- package/dist/providers/InstructionsProvider/InstructionsProvider.js.map +1 -1
- package/dist/providers/InstructionsProvider/InstructionsProvider.jsx +36 -16
- package/dist/providers/InstructionsProvider/context.d.ts +3 -0
- package/dist/providers/InstructionsProvider/context.js +2 -0
- package/dist/providers/InstructionsProvider/context.js.map +1 -1
- package/dist/providers/InstructionsProvider/useInstructions.js +3 -1
- package/dist/providers/InstructionsProvider/useInstructions.js.map +1 -1
- package/dist/types.d.ts +1 -5
- package/dist/types.js.map +1 -1
- package/dist/ui/AIConfigDashboard/index.js +198 -22
- package/dist/ui/AIConfigDashboard/index.js.map +1 -1
- package/dist/ui/AIConfigDashboard/index.jsx +159 -13
- package/dist/ui/Compose/Compose.js +21 -2
- package/dist/ui/Compose/Compose.js.map +1 -1
- package/dist/ui/Compose/Compose.jsx +21 -2
- package/dist/ui/Compose/hooks/useGenerate.js +26 -174
- package/dist/ui/Compose/hooks/useGenerate.js.map +1 -1
- package/dist/ui/Compose/hooks/useGenerateUpload.d.ts +11 -0
- package/dist/ui/Compose/hooks/useGenerateUpload.js +150 -0
- package/dist/ui/Compose/hooks/useGenerateUpload.js.map +1 -0
- package/dist/ui/Compose/hooks/useStreamingUpdate.d.ts +8 -0
- package/dist/ui/Compose/hooks/useStreamingUpdate.js +48 -0
- package/dist/ui/Compose/hooks/useStreamingUpdate.js.map +1 -0
- package/dist/ui/EncryptedTextField/index.js +4 -4
- package/dist/ui/EncryptedTextField/index.js.map +1 -1
- package/dist/ui/EncryptedTextField/index.jsx +4 -4
- package/dist/utilities/buildSmartPrompt.js +4 -6
- package/dist/utilities/buildSmartPrompt.js.map +1 -1
- package/dist/utilities/encryption.js +2 -1
- package/dist/utilities/encryption.js.map +1 -1
- package/dist/utilities/seedProperties.d.ts +7 -0
- package/dist/utilities/seedProperties.js +100 -0
- package/dist/utilities/seedProperties.js.map +1 -0
- package/dist/utilities/setSafeLexicalState.js +79 -6
- package/dist/utilities/setSafeLexicalState.js.map +1 -1
- package/dist/utilities/updateFieldsConfig.d.ts +1 -1
- package/dist/utilities/updateFieldsConfig.js +1 -0
- package/dist/utilities/updateFieldsConfig.js.map +1 -1
- package/package.json +2 -1
- package/dist/init.d.ts +0 -7
- package/dist/init.js +0 -152
- package/dist/init.js.map +0 -1
|
@@ -6,7 +6,6 @@ import { generateStandardImage } from './handlers/standard.js';
|
|
|
6
6
|
* Routes to appropriate handler based on model capabilities
|
|
7
7
|
*/ export async function generateImage(args) {
|
|
8
8
|
const { model: modelId, payload, provider } = args;
|
|
9
|
-
console.log('args: ', args.images);
|
|
10
9
|
// Get provider registry and model configuration
|
|
11
10
|
const registry = await getProviderRegistry(payload);
|
|
12
11
|
const providerConfig = registry[provider || ''];
|
|
@@ -15,7 +14,8 @@ import { generateStandardImage } from './handlers/standard.js';
|
|
|
15
14
|
}
|
|
16
15
|
const modelConfig = providerConfig.models?.find((m)=>m.id === modelId);
|
|
17
16
|
// Determine if this is a multimodal text-to-image model
|
|
18
|
-
|
|
17
|
+
// It must support both TEXT and IMAGE modalities (or at least TEXT) to be treated as a language model
|
|
18
|
+
const isMultimodalText = modelConfig?.responseModalities?.includes('IMAGE') && modelConfig?.responseModalities?.includes('TEXT');
|
|
19
19
|
// Merge provider's default image options with instruction-level overrides
|
|
20
20
|
const mergedProviderOptions = {
|
|
21
21
|
...providerConfig.options?.image || {},
|
|
@@ -23,10 +23,6 @@ import { generateStandardImage } from './handlers/standard.js';
|
|
|
23
23
|
};
|
|
24
24
|
// Get appropriate model instance
|
|
25
25
|
const model = await getImageModel(payload, provider, modelId, mergedProviderOptions, isMultimodalText);
|
|
26
|
-
console.log('isMultimodalText : ', isMultimodalText);
|
|
27
|
-
console.log('modelConfig : ', modelConfig);
|
|
28
|
-
console.log('mergedProviderOptions : ', mergedProviderOptions);
|
|
29
|
-
console.log('model : ', model);
|
|
30
26
|
// Pass merged options to handlers
|
|
31
27
|
const argsWithMergedOptions = {
|
|
32
28
|
...args,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/ai/core/media/image/generateImage.ts"],"sourcesContent":["import type { ImageModel, LanguageModel } from 'ai'\n\nimport type { ImageGenerationArgs, MediaResult } from '../types.js'\n\nimport { getImageModel, getProviderRegistry } from '../../../providers/registry.js'\nimport { generateMultimodalImage } from './handlers/multimodal.js'\nimport { generateStandardImage } from './handlers/standard.js'\n\n/**\n * Main image generation handler\n * Routes to appropriate handler based on model capabilities\n */\nexport async function generateImage(args: ImageGenerationArgs): Promise<MediaResult> {\n const { model: modelId, payload, provider } = args\n
|
|
1
|
+
{"version":3,"sources":["../../../../../src/ai/core/media/image/generateImage.ts"],"sourcesContent":["import type { ImageModel, LanguageModel } from 'ai'\n\nimport type { ImageGenerationArgs, MediaResult } from '../types.js'\n\nimport { getImageModel, getProviderRegistry } from '../../../providers/registry.js'\nimport { generateMultimodalImage } from './handlers/multimodal.js'\nimport { generateStandardImage } from './handlers/standard.js'\n\n/**\n * Main image generation handler\n * Routes to appropriate handler based on model capabilities\n */\nexport async function generateImage(args: ImageGenerationArgs): Promise<MediaResult> {\n const { model: modelId, payload, provider } = args\n // Get provider registry and model configuration\n const registry = await getProviderRegistry(payload)\n const providerConfig = registry[provider || '']\n\n if (!providerConfig) {\n throw new Error(`Provider ${provider} not found in registry`)\n }\n\n const modelConfig = providerConfig.models?.find((m) => m.id === modelId)\n\n // Determine if this is a multimodal text-to-image model\n // It must support both TEXT and IMAGE modalities (or at least TEXT) to be treated as a language model\n const isMultimodalText =\n modelConfig?.responseModalities?.includes('IMAGE') &&\n modelConfig?.responseModalities?.includes('TEXT')\n\n // Merge provider's default image options with instruction-level overrides\n const mergedProviderOptions = {\n ...(providerConfig.options?.image || {}),\n ...(args.providerOptions || {}),\n }\n\n // Get appropriate model instance\n const model = await getImageModel(\n payload,\n provider,\n modelId,\n mergedProviderOptions,\n isMultimodalText,\n )\n // Pass merged options to handlers\n const argsWithMergedOptions = { ...args, providerOptions: mergedProviderOptions }\n\n if (isMultimodalText) {\n return generateMultimodalImage(model as LanguageModel, argsWithMergedOptions)\n }\n\n return generateStandardImage(model as ImageModel, argsWithMergedOptions)\n}\n"],"names":["getImageModel","getProviderRegistry","generateMultimodalImage","generateStandardImage","generateImage","args","model","modelId","payload","provider","registry","providerConfig","Error","modelConfig","models","find","m","id","isMultimodalText","responseModalities","includes","mergedProviderOptions","options","image","providerOptions","argsWithMergedOptions"],"mappings":"AAIA,SAASA,aAAa,EAAEC,mBAAmB,QAAQ,iCAAgC;AACnF,SAASC,uBAAuB,QAAQ,2BAA0B;AAClE,SAASC,qBAAqB,QAAQ,yBAAwB;AAE9D;;;CAGC,GACD,OAAO,eAAeC,cAAcC,IAAyB;IAC3D,MAAM,EAAEC,OAAOC,OAAO,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGJ;IAC9C,gDAAgD;IAChD,MAAMK,WAAW,MAAMT,oBAAoBO;IAC3C,MAAMG,iBAAiBD,QAAQ,CAACD,YAAY,GAAG;IAE/C,IAAI,CAACE,gBAAgB;QACnB,MAAM,IAAIC,MAAM,CAAC,SAAS,EAAEH,SAAS,sBAAsB,CAAC;IAC9D;IAEA,MAAMI,cAAcF,eAAeG,MAAM,EAAEC,KAAK,CAACC,IAAMA,EAAEC,EAAE,KAAKV;IAEhE,wDAAwD;IACxD,sGAAsG;IACtG,MAAMW,mBACJL,aAAaM,oBAAoBC,SAAS,YAC1CP,aAAaM,oBAAoBC,SAAS;IAE5C,0EAA0E;IAC1E,MAAMC,wBAAwB;QAC5B,GAAIV,eAAeW,OAAO,EAAEC,SAAS,CAAC,CAAC;QACvC,GAAIlB,KAAKmB,eAAe,IAAI,CAAC,CAAC;IAChC;IAEA,iCAAiC;IACjC,MAAMlB,QAAQ,MAAMN,cAClBQ,SACAC,UACAF,SACAc,uBACAH;IAEF,kCAAkC;IAClC,MAAMO,wBAAwB;QAAE,GAAGpB,IAAI;QAAEmB,iBAAiBH;IAAsB;IAEhF,IAAIH,kBAAkB;QACpB,OAAOhB,wBAAwBI,OAAwBmB;IACzD;IAEA,OAAOtB,sBAAsBG,OAAqBmB;AACpD"}
|
package/dist/ai/prompts.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ActionPrompt
|
|
1
|
+
import type { ActionPrompt } from '../types.js';
|
|
2
2
|
export declare const defaultSystemPrompt = "IMPORTANT INSTRUCTION:\nProduce only the requested output text.\nDo not add any explanations, comments, or engagement.\nDo not use quotation marks in the response.\nBEGIN OUTPUT:";
|
|
3
3
|
export declare const defaultPrompts: ActionPrompt[];
|
|
4
|
-
export declare const defaultSeedPrompts: SeedPromptFunction;
|
package/dist/ai/prompts.js
CHANGED
|
@@ -100,115 +100,5 @@ INSTRUCTIONS:
|
|
|
100
100
|
-------------`
|
|
101
101
|
}
|
|
102
102
|
];
|
|
103
|
-
export const defaultSeedPrompts = ({ fieldLabel, fieldSchemaPaths, fieldType, path })=>{
|
|
104
|
-
return {
|
|
105
|
-
prompt: `field-type: ${fieldType}
|
|
106
|
-
field-name: ${fieldLabel}
|
|
107
|
-
schema-path: ${path}
|
|
108
|
-
|
|
109
|
-
Give me a prompt that relate to the given field type and schema path.
|
|
110
|
-
|
|
111
|
-
Generated prompt:
|
|
112
|
-
`,
|
|
113
|
-
system: `# AI Assistant for CMS Prompt Generation
|
|
114
|
-
|
|
115
|
-
Your role: Generate prompts for Content Management System (CMS) fields based on field-type and schema-path.
|
|
116
|
-
|
|
117
|
-
## Key Guidelines:
|
|
118
|
-
- Tailor prompts to specific field-type and purpose
|
|
119
|
-
- Use schema-path for context
|
|
120
|
-
- Include " {{ title }} " in every prompt
|
|
121
|
-
- Be clear, concise, and instructive
|
|
122
|
-
- Focus on content generation, not user perspective
|
|
123
|
-
- For Image, Voice, or Banner fields, use provided example prompts verbatim
|
|
124
|
-
- Image, Banner prompt MUST NOT CONTAIN ANY TYPOGRAPHY/TEXT DETAILS
|
|
125
|
-
|
|
126
|
-
## Field Types and Prompts:
|
|
127
|
-
|
|
128
|
-
1. richText:
|
|
129
|
-
- Craft detailed, structured content
|
|
130
|
-
- Include intro, sections, body, formatting, and conclusion
|
|
131
|
-
- Aim for engaging, informative, and valuable content
|
|
132
|
-
|
|
133
|
-
2. text:
|
|
134
|
-
- For titles: Generate concise, engaging titles
|
|
135
|
-
- For keywords: List relevant SEO terms
|
|
136
|
-
|
|
137
|
-
3. textarea:
|
|
138
|
-
- Provide comprehensive details (e.g., event information)
|
|
139
|
-
|
|
140
|
-
4. upload:
|
|
141
|
-
- Describe high-quality images or media
|
|
142
|
-
|
|
143
|
-
## Schema-path Examples:
|
|
144
|
-
- posts.title: Blog/article title
|
|
145
|
-
- products.name: Product name
|
|
146
|
-
|
|
147
|
-
## Must Follow:
|
|
148
|
-
- Adapt prompts to schema-path context
|
|
149
|
-
- Generate content directly, avoid personal pronouns
|
|
150
|
-
- Use provided examples as guidelines
|
|
151
|
-
|
|
152
|
-
### Examples for each field type along with generated prompt:
|
|
153
|
-
|
|
154
|
-
For richText:
|
|
155
|
-
field-type: richText
|
|
156
|
-
field-name: Content
|
|
157
|
-
schema-path: posts.content
|
|
158
|
-
Generated prompt: Craft compelling content for a blog post with the title " {{ title }} ". Develop a well-structured narrative that captivates readers from start to finish. Incorporate the following elements to create a polished and engaging piece:
|
|
159
|
-
|
|
160
|
-
- Engaging introduction that hooks the reader
|
|
161
|
-
- Clearly defined sections with relevant subheadings
|
|
162
|
-
- Well-researched and informative body paragraphs
|
|
163
|
-
- Creative use of formatting to enhance readability (e.g., bullet points, blockquotes, italics, headings, bolds, other text formats)
|
|
164
|
-
- Compelling conclusion that reinforces the main theme
|
|
165
|
-
- Make the format easily digestible and clear for enhanced readability and improved CTR.
|
|
166
|
-
- The user should be engaged, consistently interested, and feel that they’ve gained the knowledge they were seeking.
|
|
167
|
-
|
|
168
|
-
Infuse the content with your expertise and a touch of personality to make it both informative and enjoyable to read. Aim to provide value to your target audience while maintaining a professional tone that aligns with the blog's overall style.
|
|
169
|
-
Feel free to incorporate relevant anecdotes, statistics, or examples to support your points and add depth to the post. Remember, the goal is to create content that not only informs but also inspires and entertains your readers.
|
|
170
|
-
|
|
171
|
-
For text:
|
|
172
|
-
field-type: text
|
|
173
|
-
field-name: title
|
|
174
|
-
schema-path: posts.title
|
|
175
|
-
Generated prompt: Generate a captivating title for the blog post based on " {{ title }} " that effectively encapsulates the main theme and draws in readers. The title should be concise, engaging, and relevant to the content being presented. If no input is provided then generate creative title.
|
|
176
|
-
|
|
177
|
-
For text:
|
|
178
|
-
field-type: text
|
|
179
|
-
field-name: keywords
|
|
180
|
-
schema-path: posts.keywords
|
|
181
|
-
Generated prompt: Identify and list relevant keywords for the blog post titled " {{ title }} ". Focus on terms that enhance search engine optimization and accurately reflect the main themes and topics of the content.
|
|
182
|
-
keywords will with comma separated.
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
For textarea:
|
|
186
|
-
field-type: textarea:
|
|
187
|
-
field-name: details
|
|
188
|
-
schema-path: posts.details
|
|
189
|
-
Generated prompt: Provide comprehensive details for the event " {{ title }} ". Include essential information such as date, time, location, and any specific instructions or requirements.
|
|
190
|
-
|
|
191
|
-
For upload:
|
|
192
|
-
field-type: upload
|
|
193
|
-
field-name: Featured Image
|
|
194
|
-
schema-path: posts.image
|
|
195
|
-
Generated prompt: Imagine {{ title }}
|
|
196
|
-
|
|
197
|
-
For upload:
|
|
198
|
-
field-type: upload
|
|
199
|
-
field-name: Voice
|
|
200
|
-
schema-path: posts.upload
|
|
201
|
-
Generated prompt: {{ title }} {{ toHTML [provide schema-path here...] }}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
Remember to adapt the prompts based on the specific schema-path provided, considering the context and purpose of the field within the CMS structure. The prompts should directly instruct the AI model on what content to generate or describe, without assuming a user perspective.
|
|
205
|
-
|
|
206
|
-
Schema Map Context:
|
|
207
|
-
${JSON.stringify(fieldSchemaPaths)}
|
|
208
|
-
|
|
209
|
-
${defaultSystemPrompt}
|
|
210
|
-
`
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
103
|
|
|
214
104
|
//# sourceMappingURL=prompts.js.map
|
package/dist/ai/prompts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ai/prompts.ts"],"sourcesContent":["import type { ActionPrompt, SeedPromptFunction } from '../types.js'\n\n//TODO: This is a temporary solution make use of structured output\nexport const defaultSystemPrompt = `IMPORTANT INSTRUCTION:\nProduce only the requested output text.\nDo not add any explanations, comments, or engagement.\nDo not use quotation marks in the response.\nBEGIN OUTPUT:`\n\nexport const defaultPrompts: ActionPrompt[] = [\n {\n name: 'Rephrase',\n system: ({\n prompt = '',\n systemPrompt = '',\n }) => `You are a skilled language expert. Rephrase the given text while maintaining its original meaning, tone, and emotional content. Use different words and sentence structures where possible, but preserve the overall style and sentiment of the original.\n \n -------------\n INSTRUCTIONS:\n - Rephrase the text according to the guidelines of the ORIGINAL SYSTEM PROMPT, if provided.\n - Retain the original meaning, tone, and emotional content.\n - Use different vocabulary and sentence structures where appropriate.\n - Ensure the rephrased text conveys the same message and feeling as the original.\n ${prompt ? '\\n\\nPrevious prompt:\\n' + prompt : ''}\n ${systemPrompt ? '\\n\\nORIGINAL SYSTEM PROMPT:\\n' + systemPrompt : ''}\n -------------`,\n },\n {\n name: 'Expand',\n system:\n () => `You are a creative writer and subject matter expert. Expand the given text by adding depth, detail, and relevant information while maintaining the original tone and style.\n \n -------------\n INSTRUCTIONS:\n - Understand the main ideas and tone of the text.\n - Add more details, examples, explanations, or context.\n - Maintain the original tone, style, and intent.\n - Ensure the expanded version flows naturally and coherently.\n - Do not contradict or alter the original meaning.\n -------------`,\n },\n {\n name: 'Proofread',\n system:\n () => `You are an English language expert. Proofread the given text, focusing on correcting grammar and spelling mistakes without altering the content, style, or tone.\n \n -------------\n INSTRUCTIONS:\n - Correct grammar and spelling errors.\n - Do not change the content, meaning, tone, or style.\n - Return the full text, whether corrections were made or not.\n - Do not provide additional comments or analysis.\n -------------`,\n },\n {\n name: 'Simplify',\n system: ({\n prompt = '',\n }) => `You are a skilled communicator specializing in clear and concise writing. Simplify the given text to make it easier to understand while retaining its core message.\n \n -------------\n INSTRUCTIONS:\n - Simplify the language, using more common words and shorter sentences.\n - Remove unnecessary details or jargon while keeping essential information.\n - Maintain the original meaning and key points.\n - Aim for clarity and readability for a general audience.\n - The simplified text should be more concise than the original.\n ${prompt ? '\\n\\nPREVIOUS PROMPT:\\n' + prompt : ''}\n -------------`,\n },\n {\n name: 'Summarize',\n layout: () => `\n[heading] - Summary\n[paragraph] - Your summary goes here...\n `,\n system: () =>\n `You are an expert at summarizing information. Your task is to create a concise summary of the given text that captures its key points and essential details while preserving the original meaning.\n\nINSTRUCTIONS:\n1. Carefully read and analyze the provided text.\n2. Identify and extract the main ideas and crucial supporting details.\n3. Condense the information into a clear and coherent summary that maintains the core message.\n4. Preserve the original tone and intent of the text.\n5. Ensure your summary is approximately 25-30% of the original text length.\n6. Use clear and precise language, avoiding unnecessary jargon or complexity.\n`,\n },\n {\n name: 'Tone',\n system: () =>\n `You are a tone adjustment specialist. Modify the tone of the given text as specified while keeping the original message and content intact.\n \n -------------\n INSTRUCTIONS:\n - Adjust the tone to match the specified style (e.g., formal, informal, professional, friendly).\n - Maintain the original content and meaning.\n - Ensure the adjusted text flows naturally with the new tone.\n -------------`,\n },\n {\n name: 'Translate',\n system: ({ locale, prompt = '', systemPrompt = '' }) =>\n `You are a skilled translator. Translate the following text into ${locale}, ensuring the original meaning, tone, and context are preserved.\n \n -------------\n INSTRUCTIONS:\n - Accurately translate the text into ${locale}.\n - Preserve the original meaning, tone, and context.\n - Ensure the translation is culturally appropriate and natural in the target language.\n ${prompt ? '\\n\\nPREVIOUS PROMPT:\\n' + prompt : ''}\n ${systemPrompt ? '\\n\\nORIGINAL SYSTEM PROMPT:\\n' + systemPrompt : ''}\n -------------`,\n },\n]\n\nexport const defaultSeedPrompts: SeedPromptFunction = ({\n fieldLabel,\n fieldSchemaPaths,\n fieldType,\n path,\n}: {\n fieldLabel: string\n fieldSchemaPaths: any\n fieldType: string\n path: string\n}) => {\n return {\n prompt: `field-type: ${fieldType}\nfield-name: ${fieldLabel}\nschema-path: ${path}\n\nGive me a prompt that relate to the given field type and schema path.\n\nGenerated prompt:\n`,\n system: `# AI Assistant for CMS Prompt Generation\n\nYour role: Generate prompts for Content Management System (CMS) fields based on field-type and schema-path.\n\n## Key Guidelines:\n- Tailor prompts to specific field-type and purpose\n- Use schema-path for context\n- Include \" {{ title }} \" in every prompt\n- Be clear, concise, and instructive\n- Focus on content generation, not user perspective\n- For Image, Voice, or Banner fields, use provided example prompts verbatim\n- Image, Banner prompt MUST NOT CONTAIN ANY TYPOGRAPHY/TEXT DETAILS\n\n## Field Types and Prompts:\n\n1. richText:\n - Craft detailed, structured content\n - Include intro, sections, body, formatting, and conclusion\n - Aim for engaging, informative, and valuable content\n\n2. text:\n - For titles: Generate concise, engaging titles\n - For keywords: List relevant SEO terms\n\n3. textarea:\n - Provide comprehensive details (e.g., event information)\n\n4. upload:\n - Describe high-quality images or media\n\n## Schema-path Examples:\n- posts.title: Blog/article title\n- products.name: Product name\n\n## Must Follow:\n- Adapt prompts to schema-path context\n- Generate content directly, avoid personal pronouns\n- Use provided examples as guidelines\n\n### Examples for each field type along with generated prompt:\n\nFor richText:\n field-type: richText\n field-name: Content\n schema-path: posts.content\n Generated prompt: Craft compelling content for a blog post with the title \" {{ title }} \". Develop a well-structured narrative that captivates readers from start to finish. Incorporate the following elements to create a polished and engaging piece:\n\n- Engaging introduction that hooks the reader\n- Clearly defined sections with relevant subheadings\n- Well-researched and informative body paragraphs\n- Creative use of formatting to enhance readability (e.g., bullet points, blockquotes, italics, headings, bolds, other text formats)\n- Compelling conclusion that reinforces the main theme\n- Make the format easily digestible and clear for enhanced readability and improved CTR. \n- The user should be engaged, consistently interested, and feel that they’ve gained the knowledge they were seeking. \n\nInfuse the content with your expertise and a touch of personality to make it both informative and enjoyable to read. Aim to provide value to your target audience while maintaining a professional tone that aligns with the blog's overall style.\nFeel free to incorporate relevant anecdotes, statistics, or examples to support your points and add depth to the post. Remember, the goal is to create content that not only informs but also inspires and entertains your readers.\n\nFor text:\n field-type: text\n field-name: title\n schema-path: posts.title\n Generated prompt: Generate a captivating title for the blog post based on \" {{ title }} \" that effectively encapsulates the main theme and draws in readers. The title should be concise, engaging, and relevant to the content being presented. If no input is provided then generate creative title.\n\nFor text:\n field-type: text\n field-name: keywords\n schema-path: posts.keywords\n Generated prompt: Identify and list relevant keywords for the blog post titled \" {{ title }} \". Focus on terms that enhance search engine optimization and accurately reflect the main themes and topics of the content.\nkeywords will with comma separated.\n\n\nFor textarea:\n field-type: textarea:\n field-name: details\n schema-path: posts.details\n Generated prompt: Provide comprehensive details for the event \" {{ title }} \". Include essential information such as date, time, location, and any specific instructions or requirements.\n\nFor upload:\n field-type: upload\n field-name: Featured Image\n schema-path: posts.image\n Generated prompt: Imagine {{ title }}\n\nFor upload:\n field-type: upload\n field-name: Voice\n schema-path: posts.upload\n Generated prompt: {{ title }} {{ toHTML [provide schema-path here...] }}\n\n\nRemember to adapt the prompts based on the specific schema-path provided, considering the context and purpose of the field within the CMS structure. The prompts should directly instruct the AI model on what content to generate or describe, without assuming a user perspective.\n\nSchema Map Context:\n${JSON.stringify(fieldSchemaPaths)}\n\n${defaultSystemPrompt}\n`,\n }\n}\n"],"names":["defaultSystemPrompt","defaultPrompts","name","system","prompt","systemPrompt","layout","locale","defaultSeedPrompts","fieldLabel","fieldSchemaPaths","fieldType","path","JSON","stringify"],"mappings":"AAEA,kEAAkE;AAClE,OAAO,MAAMA,sBAAsB,CAAC;;;;aAIvB,CAAC,CAAA;AAEd,OAAO,MAAMC,iBAAiC;IAC5C;QACEC,MAAM;QACNC,QAAQ,CAAC,EACPC,SAAS,EAAE,EACXC,eAAe,EAAE,EAClB,GAAK,CAAC;;;;;;;;MAQL,EAAED,SAAS,2BAA2BA,SAAS,GAAG;MAClD,EAAEC,eAAe,kCAAkCA,eAAe,GAAG;mBACxD,CAAC;IAClB;IACA;QACEH,MAAM;QACNC,QACE,IAAM,CAAC;;;;;;;;;mBASM,CAAC;IAClB;IACA;QACED,MAAM;QACNC,QACE,IAAM,CAAC;;;;;;;;mBAQM,CAAC;IAClB;IACA;QACED,MAAM;QACNC,QAAQ,CAAC,EACPC,SAAS,EAAE,EACZ,GAAK,CAAC;;;;;;;;;MASL,EAAEA,SAAS,2BAA2BA,SAAS,GAAG;mBACrC,CAAC;IAClB;IACA;QACEF,MAAM;QACNI,QAAQ,IAAM,CAAC;;;IAGf,CAAC;QACDH,QAAQ,IACN,CAAC;;;;;;;;;AASP,CAAC;IACC;IACA;QACED,MAAM;QACNC,QAAQ,IACN,CAAC;;;;;;;mBAOY,CAAC;IAClB;IACA;QACED,MAAM;QACNC,QAAQ,CAAC,EAAEI,MAAM,EAAEH,SAAS,EAAE,EAAEC,eAAe,EAAE,EAAE,GACjD,CAAC,gEAAgE,EAAEE,OAAO;;;;yCAIvC,EAAEA,OAAO;;;IAG9C,EAAEH,SAAS,2BAA2BA,SAAS,GAAG;IAClD,EAAEC,eAAe,kCAAkCA,eAAe,GAAG;iBACxD,CAAC;IAChB;CACD,CAAA;AAED,OAAO,MAAMG,qBAAyC,CAAC,EACrDC,UAAU,EACVC,gBAAgB,EAChBC,SAAS,EACTC,IAAI,EAML;IACC,OAAO;QACLR,QAAQ,CAAC,YAAY,EAAEO,UAAU;YACzB,EAAEF,WAAW;aACZ,EAAEG,KAAK;;;;;AAKpB,CAAC;QACGT,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8Fb,EAAEU,KAAKC,SAAS,CAACJ,kBAAkB;;AAEnC,EAAEV,oBAAoB;AACtB,CAAC;IACC;AACF,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../../src/ai/prompts.ts"],"sourcesContent":["import type { ActionPrompt } from '../types.js'\n\n//TODO: This is a temporary solution make use of structured output\nexport const defaultSystemPrompt = `IMPORTANT INSTRUCTION:\nProduce only the requested output text.\nDo not add any explanations, comments, or engagement.\nDo not use quotation marks in the response.\nBEGIN OUTPUT:`\n\nexport const defaultPrompts: ActionPrompt[] = [\n {\n name: 'Rephrase',\n system: ({\n prompt = '',\n systemPrompt = '',\n }) => `You are a skilled language expert. Rephrase the given text while maintaining its original meaning, tone, and emotional content. Use different words and sentence structures where possible, but preserve the overall style and sentiment of the original.\n \n -------------\n INSTRUCTIONS:\n - Rephrase the text according to the guidelines of the ORIGINAL SYSTEM PROMPT, if provided.\n - Retain the original meaning, tone, and emotional content.\n - Use different vocabulary and sentence structures where appropriate.\n - Ensure the rephrased text conveys the same message and feeling as the original.\n ${prompt ? '\\n\\nPrevious prompt:\\n' + prompt : ''}\n ${systemPrompt ? '\\n\\nORIGINAL SYSTEM PROMPT:\\n' + systemPrompt : ''}\n -------------`,\n },\n {\n name: 'Expand',\n system:\n () => `You are a creative writer and subject matter expert. Expand the given text by adding depth, detail, and relevant information while maintaining the original tone and style.\n \n -------------\n INSTRUCTIONS:\n - Understand the main ideas and tone of the text.\n - Add more details, examples, explanations, or context.\n - Maintain the original tone, style, and intent.\n - Ensure the expanded version flows naturally and coherently.\n - Do not contradict or alter the original meaning.\n -------------`,\n },\n {\n name: 'Proofread',\n system:\n () => `You are an English language expert. Proofread the given text, focusing on correcting grammar and spelling mistakes without altering the content, style, or tone.\n \n -------------\n INSTRUCTIONS:\n - Correct grammar and spelling errors.\n - Do not change the content, meaning, tone, or style.\n - Return the full text, whether corrections were made or not.\n - Do not provide additional comments or analysis.\n -------------`,\n },\n {\n name: 'Simplify',\n system: ({\n prompt = '',\n }) => `You are a skilled communicator specializing in clear and concise writing. Simplify the given text to make it easier to understand while retaining its core message.\n \n -------------\n INSTRUCTIONS:\n - Simplify the language, using more common words and shorter sentences.\n - Remove unnecessary details or jargon while keeping essential information.\n - Maintain the original meaning and key points.\n - Aim for clarity and readability for a general audience.\n - The simplified text should be more concise than the original.\n ${prompt ? '\\n\\nPREVIOUS PROMPT:\\n' + prompt : ''}\n -------------`,\n },\n {\n name: 'Summarize',\n layout: () => `\n[heading] - Summary\n[paragraph] - Your summary goes here...\n `,\n system: () =>\n `You are an expert at summarizing information. Your task is to create a concise summary of the given text that captures its key points and essential details while preserving the original meaning.\n\nINSTRUCTIONS:\n1. Carefully read and analyze the provided text.\n2. Identify and extract the main ideas and crucial supporting details.\n3. Condense the information into a clear and coherent summary that maintains the core message.\n4. Preserve the original tone and intent of the text.\n5. Ensure your summary is approximately 25-30% of the original text length.\n6. Use clear and precise language, avoiding unnecessary jargon or complexity.\n`,\n },\n {\n name: 'Tone',\n system: () =>\n `You are a tone adjustment specialist. Modify the tone of the given text as specified while keeping the original message and content intact.\n \n -------------\n INSTRUCTIONS:\n - Adjust the tone to match the specified style (e.g., formal, informal, professional, friendly).\n - Maintain the original content and meaning.\n - Ensure the adjusted text flows naturally with the new tone.\n -------------`,\n },\n {\n name: 'Translate',\n system: ({ locale, prompt = '', systemPrompt = '' }) =>\n `You are a skilled translator. Translate the following text into ${locale}, ensuring the original meaning, tone, and context are preserved.\n \n -------------\n INSTRUCTIONS:\n - Accurately translate the text into ${locale}.\n - Preserve the original meaning, tone, and context.\n - Ensure the translation is culturally appropriate and natural in the target language.\n ${prompt ? '\\n\\nPREVIOUS PROMPT:\\n' + prompt : ''}\n ${systemPrompt ? '\\n\\nORIGINAL SYSTEM PROMPT:\\n' + systemPrompt : ''}\n -------------`,\n },\n]\n"],"names":["defaultSystemPrompt","defaultPrompts","name","system","prompt","systemPrompt","layout","locale"],"mappings":"AAEA,kEAAkE;AAClE,OAAO,MAAMA,sBAAsB,CAAC;;;;aAIvB,CAAC,CAAA;AAEd,OAAO,MAAMC,iBAAiC;IAC5C;QACEC,MAAM;QACNC,QAAQ,CAAC,EACPC,SAAS,EAAE,EACXC,eAAe,EAAE,EAClB,GAAK,CAAC;;;;;;;;MAQL,EAAED,SAAS,2BAA2BA,SAAS,GAAG;MAClD,EAAEC,eAAe,kCAAkCA,eAAe,GAAG;mBACxD,CAAC;IAClB;IACA;QACEH,MAAM;QACNC,QACE,IAAM,CAAC;;;;;;;;;mBASM,CAAC;IAClB;IACA;QACED,MAAM;QACNC,QACE,IAAM,CAAC;;;;;;;;mBAQM,CAAC;IAClB;IACA;QACED,MAAM;QACNC,QAAQ,CAAC,EACPC,SAAS,EAAE,EACZ,GAAK,CAAC;;;;;;;;;MASL,EAAEA,SAAS,2BAA2BA,SAAS,GAAG;mBACrC,CAAC;IAClB;IACA;QACEF,MAAM;QACNI,QAAQ,IAAM,CAAC;;;IAGf,CAAC;QACDH,QAAQ,IACN,CAAC;;;;;;;;;AASP,CAAC;IACC;IACA;QACED,MAAM;QACNC,QAAQ,IACN,CAAC;;;;;;;mBAOY,CAAC;IAClB;IACA;QACED,MAAM;QACNC,QAAQ,CAAC,EAAEI,MAAM,EAAEH,SAAS,EAAE,EAAEC,eAAe,EAAE,EAAE,GACjD,CAAC,gEAAgE,EAAEE,OAAO;;;;yCAIvC,EAAEA,OAAO;;;IAG9C,EAAEH,SAAS,2BAA2BA,SAAS,GAAG;IAClD,EAAEC,eAAe,kCAAkCA,eAAe,GAAG;iBACxD,CAAC;IAChB;CACD,CAAA"}
|
|
@@ -309,7 +309,7 @@ export const elevenlabsBlock = {
|
|
|
309
309
|
RowLabel: '@ai-stack/payloadcms/client#ModelRowLabel'
|
|
310
310
|
},
|
|
311
311
|
description: 'Configure TTS models. Use the Voices and Provider Options tabs for detailed settings.',
|
|
312
|
-
initCollapsed:
|
|
312
|
+
initCollapsed: true
|
|
313
313
|
},
|
|
314
314
|
defaultValue: [
|
|
315
315
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/ai/providers/blocks/elevenlabs.ts"],"sourcesContent":["import type { Block } from 'payload'\n\nimport { ElevenLabsIcon } from '../icons.js'\n\nexport const elevenlabsBlock: Block = {\n slug: 'elevenlabs',\n custom: {\n providerOptionsSchemas: {\n tts: {\n fields: [\n 'stability',\n 'similarity_boost',\n 'style',\n 'use_speaker_boost',\n 'seed',\n 'language_code',\n 'apply_text_normalization',\n 'apply_language_text_normalization',\n ],\n },\n },\n },\n fields: [\n {\n type: 'tabs',\n tabs: [\n // 1. Setup tab\n {\n fields: [\n {\n name: 'enabled',\n type: 'checkbox',\n defaultValue: true,\n label: 'Enabled',\n },\n {\n name: 'apiKey',\n type: 'text',\n admin: {\n components: {\n Field: '@ai-stack/payloadcms/client#EncryptedTextField',\n },\n description:\n 'Your ElevenLabs API key. Will be encrypted in the database. Get yours at elevenlabs.io',\n },\n label: 'API Key',\n required: true,\n },\n ],\n label: 'Setup',\n },\n\n // 2. Connection tab\n {\n fields: [\n {\n type: 'collapsible',\n admin: {\n initCollapsed: false,\n },\n fields: [\n {\n name: 'baseURL',\n type: 'text',\n admin: {\n description:\n 'Optional. Override default API endpoint (defaults to https://api.elevenlabs.io/v1).',\n },\n defaultValue: 'https://api.elevenlabs.io/v1',\n label: 'Base URL',\n },\n {\n name: 'headers',\n type: 'array',\n admin: {\n description: 'Optional. Custom headers to send with every request.',\n },\n fields: [\n {\n type: 'row',\n fields: [\n {\n name: 'key',\n type: 'text',\n admin: {\n width: '50%',\n },\n label: 'Header Name',\n required: true,\n },\n {\n name: 'value',\n type: 'text',\n admin: {\n width: '50%',\n },\n label: 'Header Value',\n required: true,\n },\n ],\n },\n ],\n label: 'Custom Headers',\n },\n ],\n label: 'API & Network Settings',\n },\n ],\n label: 'Connection',\n },\n\n // 3. Voices tab (Existing)\n {\n fields: [\n {\n name: 'voicesFetcherUI',\n type: 'ui',\n admin: {\n components: {\n Field: '@ai-stack/payloadcms/client#VoicesFetcher',\n },\n },\n },\n {\n name: 'voices',\n type: 'array',\n admin: {\n description:\n 'Use the \"Fetch Voices\" button above to populate this list from your ElevenLabs account.',\n initCollapsed: false,\n },\n fields: [\n {\n type: 'row',\n fields: [\n {\n name: 'id',\n type: 'text',\n admin: {\n description: 'Voice ID from ElevenLabs',\n width: '40%',\n },\n label: 'Voice ID',\n required: true,\n },\n {\n name: 'name',\n type: 'text',\n admin: {\n width: '40%',\n },\n label: 'Display Name',\n required: true,\n },\n {\n name: 'enabled',\n type: 'checkbox',\n admin: {\n width: '20%',\n },\n defaultValue: true,\n label: 'Enabled',\n },\n ],\n },\n {\n type: 'row',\n fields: [\n {\n name: 'category',\n type: 'select',\n admin: {\n width: '50%',\n },\n dbName: 'eleven-voice-category',\n label: 'Category',\n options: [\n { label: 'Premade', value: 'premade' },\n { label: 'Cloned', value: 'cloned' },\n { label: 'Professional', value: 'professional' },\n { label: 'Generated', value: 'generated' },\n ],\n },\n {\n name: 'preview_url',\n type: 'text',\n admin: {\n width: '50%',\n },\n label: 'Preview URL',\n },\n ],\n },\n {\n name: 'labels',\n type: 'json',\n admin: {\n description:\n 'Voice attributes like gender, age, accent (JSON object). Example: {\"gender\": \"female\", \"age\": \"young\", \"accent\": \"american\"}',\n },\n label: 'Labels',\n },\n ],\n label: 'Available Voices',\n },\n ],\n label: 'Voices',\n },\n\n // 4. Provider Options (NEW)\n {\n fields: [\n {\n name: 'ttsProviderOptions',\n type: 'group',\n admin: {\n description: 'Default provider options for ElevenLabs TTS.',\n },\n fields: [\n {\n name: 'voice_settings',\n type: 'group',\n fields: [\n {\n name: 'stability',\n type: 'number',\n defaultValue: 0.5,\n label: 'Default Stability',\n max: 1,\n min: 0,\n },\n {\n name: 'similarity_boost',\n type: 'number',\n defaultValue: 0.75,\n label: 'Default Similarity Boost',\n max: 1,\n min: 0,\n },\n {\n name: 'style',\n type: 'number',\n defaultValue: 0,\n label: 'Default Style',\n max: 1,\n min: 0,\n },\n {\n name: 'use_speaker_boost',\n type: 'checkbox',\n defaultValue: false,\n label: 'Use Speaker Boost',\n },\n ],\n label: 'Voice Settings',\n },\n {\n name: 'seed',\n type: 'number',\n label: 'Default Seed',\n max: 4294967295,\n min: 0,\n },\n {\n name: 'apply_text_normalization',\n type: 'select',\n dbName: 'eleven-tts-normalization',\n defaultValue: 'auto',\n label: 'Text Normalization',\n options: [\n { label: 'Auto', value: 'auto' },\n { label: 'On', value: 'on' },\n { label: 'Off', value: 'off' },\n ],\n },\n {\n name: 'language_code',\n type: 'text',\n admin: {\n placeholder: 'en',\n },\n label: 'Language Code',\n },\n ],\n label: 'TTS Provider Options',\n },\n ],\n label: 'Provider Options',\n },\n\n // 5. Models (SIMPLIFIED - no per-model settings)\n {\n fields: [\n {\n name: 'models',\n type: 'array',\n admin: {\n components: {\n RowLabel: '@ai-stack/payloadcms/client#ModelRowLabel',\n },\n description:\n 'Configure TTS models. Use the Voices and Provider Options tabs for detailed settings.',\n initCollapsed: false,\n },\n defaultValue: [\n {\n id: 'eleven_flash_v2_5',\n name: 'Flash V2.5 (Fastest)',\n enabled: true,\n responseModalities: ['AUDIO'],\n useCase: 'tts',\n },\n {\n id: 'eleven_turbo_v2_5',\n name: 'Turbo V2.5 (Latest)',\n enabled: true,\n responseModalities: ['AUDIO'],\n useCase: 'tts',\n },\n {\n id: 'eleven_multilingual_v2',\n name: 'Multilingual V2',\n enabled: true,\n responseModalities: ['AUDIO'],\n useCase: 'tts',\n },\n {\n id: 'eleven_turbo_v2',\n name: 'Turbo V2',\n enabled: false,\n responseModalities: ['AUDIO'],\n useCase: 'tts',\n },\n ],\n fields: [\n // Basic info\n {\n type: 'row',\n fields: [\n {\n name: 'id',\n type: 'text',\n admin: {\n description: 'Model ID (e.g., eleven_flash_v2_5)',\n width: '50%',\n },\n label: 'Model ID',\n required: true,\n },\n {\n name: 'name',\n type: 'text',\n admin: {\n width: '50%',\n },\n label: 'Display Name',\n required: true,\n },\n ],\n },\n {\n type: 'row',\n fields: [\n {\n name: 'useCase',\n type: 'select',\n admin: {\n width: '33%',\n },\n dbName: 'eleven-model-useCase',\n defaultValue: 'tts',\n label: 'Use Case',\n options: [{ label: 'Text-to-Speech', value: 'tts' }],\n },\n {\n name: 'responseModalities',\n type: 'select',\n admin: {\n description: 'Output capabilities of this model',\n width: '33%',\n },\n dbName: 'eleven-model-modalities',\n hasMany: true,\n label: 'Response Modalities',\n options: [\n { label: 'Text', value: 'TEXT' },\n { label: 'Audio', value: 'AUDIO' },\n ],\n },\n {\n name: 'enabled',\n type: 'checkbox',\n admin: {\n width: '33%',\n },\n defaultValue: true,\n label: 'Enabled',\n },\n ],\n },\n ],\n label: 'Available Models',\n labels: {\n plural: 'Models',\n singular: 'Model',\n },\n },\n ],\n label: 'Models',\n },\n ],\n },\n ],\n imageURL: ElevenLabsIcon,\n labels: {\n plural: 'ElevenLabs Providers',\n singular: 'ElevenLabs',\n },\n}\n"],"names":["ElevenLabsIcon","elevenlabsBlock","slug","custom","providerOptionsSchemas","tts","fields","type","tabs","name","defaultValue","label","admin","components","Field","description","required","initCollapsed","width","dbName","options","value","max","min","placeholder","RowLabel","id","enabled","responseModalities","useCase","hasMany","labels","plural","singular","imageURL"],"mappings":"AAEA,SAASA,cAAc,QAAQ,cAAa;AAE5C,OAAO,MAAMC,kBAAyB;IACpCC,MAAM;IACNC,QAAQ;QACNC,wBAAwB;YACtBC,KAAK;gBACHC,QAAQ;oBACN;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;iBACD;YACH;QACF;IACF;IACAA,QAAQ;QACN;YACEC,MAAM;YACNC,MAAM;gBACJ,eAAe;gBACf;oBACEF,QAAQ;wBACN;4BACEG,MAAM;4BACNF,MAAM;4BACNG,cAAc;4BACdC,OAAO;wBACT;wBACA;4BACEF,MAAM;4BACNF,MAAM;4BACNK,OAAO;gCACLC,YAAY;oCACVC,OAAO;gCACT;gCACAC,aACE;4BACJ;4BACAJ,OAAO;4BACPK,UAAU;wBACZ;qBACD;oBACDL,OAAO;gBACT;gBAEA,oBAAoB;gBACpB;oBACEL,QAAQ;wBACN;4BACEC,MAAM;4BACNK,OAAO;gCACLK,eAAe;4BACjB;4BACAX,QAAQ;gCACN;oCACEG,MAAM;oCACNF,MAAM;oCACNK,OAAO;wCACLG,aACE;oCACJ;oCACAL,cAAc;oCACdC,OAAO;gCACT;gCACA;oCACEF,MAAM;oCACNF,MAAM;oCACNK,OAAO;wCACLG,aAAa;oCACf;o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,OAAO;oDAASU,OAAO;gDAAQ;6CAClC;wCACH;wCACA;4CACEZ,MAAM;4CACNF,MAAM;4CACNK,OAAO;gDACLM,OAAO;4CACT;4CACAR,cAAc;4CACdC,OAAO;wCACT;qCACD;gCACH;6BACD;4BACDA,OAAO;4BACPoB,QAAQ;gCACNC,QAAQ;gCACRC,UAAU;4BACZ;wBACF;qBACD;oBACDtB,OAAO;gBACT;aACD;QACH;KACD;IACDuB,UAAUlC;IACV+B,QAAQ;QACNC,QAAQ;QACRC,UAAU;IACZ;AACF,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/ai/providers/blocks/elevenlabs.ts"],"sourcesContent":["import type { Block } from 'payload'\n\nimport { ElevenLabsIcon } from '../icons.js'\n\nexport const elevenlabsBlock: Block = {\n slug: 'elevenlabs',\n custom: {\n providerOptionsSchemas: {\n tts: {\n fields: [\n 'stability',\n 'similarity_boost',\n 'style',\n 'use_speaker_boost',\n 'seed',\n 'language_code',\n 'apply_text_normalization',\n 'apply_language_text_normalization',\n ],\n },\n },\n },\n fields: [\n {\n type: 'tabs',\n tabs: [\n // 1. Setup tab\n {\n fields: [\n {\n name: 'enabled',\n type: 'checkbox',\n defaultValue: true,\n label: 'Enabled',\n },\n {\n name: 'apiKey',\n type: 'text',\n admin: {\n components: {\n Field: '@ai-stack/payloadcms/client#EncryptedTextField',\n },\n description:\n 'Your ElevenLabs API key. Will be encrypted in the database. Get yours at elevenlabs.io',\n },\n label: 'API Key',\n required: true,\n },\n ],\n label: 'Setup',\n },\n\n // 2. Connection tab\n {\n fields: [\n {\n type: 'collapsible',\n admin: {\n initCollapsed: false,\n },\n fields: [\n {\n name: 'baseURL',\n type: 'text',\n admin: {\n description:\n 'Optional. Override default API endpoint (defaults to https://api.elevenlabs.io/v1).',\n },\n defaultValue: 'https://api.elevenlabs.io/v1',\n label: 'Base URL',\n },\n {\n name: 'headers',\n type: 'array',\n admin: {\n description: 'Optional. Custom headers to send with every request.',\n },\n fields: [\n {\n type: 'row',\n fields: [\n {\n name: 'key',\n type: 'text',\n admin: {\n width: '50%',\n },\n label: 'Header Name',\n required: true,\n },\n {\n name: 'value',\n type: 'text',\n admin: {\n width: '50%',\n },\n label: 'Header Value',\n required: true,\n },\n ],\n },\n ],\n label: 'Custom Headers',\n },\n ],\n label: 'API & Network Settings',\n },\n ],\n label: 'Connection',\n },\n\n // 3. Voices tab (Existing)\n {\n fields: [\n {\n name: 'voicesFetcherUI',\n type: 'ui',\n admin: {\n components: {\n Field: '@ai-stack/payloadcms/client#VoicesFetcher',\n },\n },\n },\n {\n name: 'voices',\n type: 'array',\n admin: {\n description:\n 'Use the \"Fetch Voices\" button above to populate this list from your ElevenLabs account.',\n initCollapsed: false,\n },\n fields: [\n {\n type: 'row',\n fields: [\n {\n name: 'id',\n type: 'text',\n admin: {\n description: 'Voice ID from ElevenLabs',\n width: '40%',\n },\n label: 'Voice ID',\n required: true,\n },\n {\n name: 'name',\n type: 'text',\n admin: {\n width: '40%',\n },\n label: 'Display Name',\n required: true,\n },\n {\n name: 'enabled',\n type: 'checkbox',\n admin: {\n width: '20%',\n },\n defaultValue: true,\n label: 'Enabled',\n },\n ],\n },\n {\n type: 'row',\n fields: [\n {\n name: 'category',\n type: 'select',\n admin: {\n width: '50%',\n },\n dbName: 'eleven-voice-category',\n label: 'Category',\n options: [\n { label: 'Premade', value: 'premade' },\n { label: 'Cloned', value: 'cloned' },\n { label: 'Professional', value: 'professional' },\n { label: 'Generated', value: 'generated' },\n ],\n },\n {\n name: 'preview_url',\n type: 'text',\n admin: {\n width: '50%',\n },\n label: 'Preview URL',\n },\n ],\n },\n {\n name: 'labels',\n type: 'json',\n admin: {\n description:\n 'Voice attributes like gender, age, accent (JSON object). Example: {\"gender\": \"female\", \"age\": \"young\", \"accent\": \"american\"}',\n },\n label: 'Labels',\n },\n ],\n label: 'Available Voices',\n },\n ],\n label: 'Voices',\n },\n\n // 4. Provider Options (NEW)\n {\n fields: [\n {\n name: 'ttsProviderOptions',\n type: 'group',\n admin: {\n description: 'Default provider options for ElevenLabs TTS.',\n },\n fields: [\n {\n name: 'voice_settings',\n type: 'group',\n fields: [\n {\n name: 'stability',\n type: 'number',\n defaultValue: 0.5,\n label: 'Default Stability',\n max: 1,\n min: 0,\n },\n {\n name: 'similarity_boost',\n type: 'number',\n defaultValue: 0.75,\n label: 'Default Similarity Boost',\n max: 1,\n min: 0,\n },\n {\n name: 'style',\n type: 'number',\n defaultValue: 0,\n label: 'Default Style',\n max: 1,\n min: 0,\n },\n {\n name: 'use_speaker_boost',\n type: 'checkbox',\n defaultValue: false,\n label: 'Use Speaker Boost',\n },\n ],\n label: 'Voice Settings',\n },\n {\n name: 'seed',\n type: 'number',\n label: 'Default Seed',\n max: 4294967295,\n min: 0,\n },\n {\n name: 'apply_text_normalization',\n type: 'select',\n dbName: 'eleven-tts-normalization',\n defaultValue: 'auto',\n label: 'Text Normalization',\n options: [\n { label: 'Auto', value: 'auto' },\n { label: 'On', value: 'on' },\n { label: 'Off', value: 'off' },\n ],\n },\n {\n name: 'language_code',\n type: 'text',\n admin: {\n placeholder: 'en',\n },\n label: 'Language Code',\n },\n ],\n label: 'TTS Provider Options',\n },\n ],\n label: 'Provider Options',\n },\n\n // 5. Models (SIMPLIFIED - no per-model settings)\n {\n fields: [\n {\n name: 'models',\n type: 'array',\n admin: {\n components: {\n RowLabel: '@ai-stack/payloadcms/client#ModelRowLabel',\n },\n description:\n 'Configure TTS models. Use the Voices and Provider Options tabs for detailed settings.',\n initCollapsed: true,\n },\n defaultValue: [\n {\n id: 'eleven_flash_v2_5',\n name: 'Flash V2.5 (Fastest)',\n enabled: true,\n responseModalities: ['AUDIO'],\n useCase: 'tts',\n },\n {\n id: 'eleven_turbo_v2_5',\n name: 'Turbo V2.5 (Latest)',\n enabled: true,\n responseModalities: ['AUDIO'],\n useCase: 'tts',\n },\n {\n id: 'eleven_multilingual_v2',\n name: 'Multilingual V2',\n enabled: true,\n responseModalities: ['AUDIO'],\n useCase: 'tts',\n },\n {\n id: 'eleven_turbo_v2',\n name: 'Turbo V2',\n enabled: false,\n responseModalities: ['AUDIO'],\n useCase: 'tts',\n },\n ],\n fields: [\n // Basic info\n {\n type: 'row',\n fields: [\n {\n name: 'id',\n type: 'text',\n admin: {\n description: 'Model ID (e.g., eleven_flash_v2_5)',\n width: '50%',\n },\n label: 'Model ID',\n required: true,\n },\n {\n name: 'name',\n type: 'text',\n admin: {\n width: '50%',\n },\n label: 'Display Name',\n required: true,\n },\n ],\n },\n {\n type: 'row',\n fields: [\n {\n name: 'useCase',\n type: 'select',\n admin: {\n width: '33%',\n },\n dbName: 'eleven-model-useCase',\n defaultValue: 'tts',\n label: 'Use Case',\n options: [{ label: 'Text-to-Speech', value: 'tts' }],\n },\n {\n name: 'responseModalities',\n type: 'select',\n admin: {\n description: 'Output capabilities of this model',\n width: '33%',\n },\n dbName: 'eleven-model-modalities',\n hasMany: true,\n label: 'Response Modalities',\n options: [\n { label: 'Text', value: 'TEXT' },\n { label: 'Audio', value: 'AUDIO' },\n ],\n },\n {\n name: 'enabled',\n type: 'checkbox',\n admin: {\n width: '33%',\n },\n defaultValue: true,\n label: 'Enabled',\n },\n ],\n },\n ],\n label: 'Available Models',\n labels: {\n plural: 'Models',\n singular: 'Model',\n },\n },\n ],\n label: 'Models',\n },\n ],\n },\n ],\n imageURL: ElevenLabsIcon,\n labels: {\n plural: 'ElevenLabs Providers',\n singular: 'ElevenLabs',\n },\n}\n"],"names":["ElevenLabsIcon","elevenlabsBlock","slug","custom","providerOptionsSchemas","tts","fields","type","tabs","name","defaultValue","label","admin","components","Field","description","required","initCollapsed","width","dbName","options","value","max","min","placeholder","RowLabel","id","enabled","responseModalities","useCase","hasMany","labels","plural","singular","imageURL"],"mappings":"AAEA,SAASA,cAAc,QAAQ,cAAa;AAE5C,OAAO,MAAMC,kBAAyB;IACpCC,MAAM;IACNC,QAAQ;QACNC,wBAAwB;YACtBC,KAAK;gBACHC,QAAQ;oBACN;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;iBACD;YACH;QACF;IACF;IACAA,QAAQ;QACN;YACEC,MAAM;YACNC,MAAM;gBACJ,eAAe;gBACf;oBACEF,QAAQ;wBACN;4BACEG,MAAM;4BACNF,MAAM;4BACNG,cAAc;4BACdC,OAAO;wBACT;wBACA;4BACEF,MAAM;4BACNF,MAAM;4BACNK,OAAO;gCACLC,YAAY;oCACVC,OAAO;gCACT;gCACAC,aACE;4BACJ;4BACAJ,OAAO;4BACPK,UAAU;wBACZ;qBACD;oBACDL,OAAO;gBACT;gBAEA,oBAAoB;gBACpB;oBACEL,QAAQ;wBACN;4BACEC,MAAM;4BACNK,OAAO;gCACLK,eAAe;4BACjB;4BACAX,QAAQ;gCACN;oCACEG,MAAM;oCACNF,MAAM;oCACNK,OAAO;wCACLG,aACE;oCACJ;oCACAL,cAAc;oCACdC,OAAO;gCACT;gCACA;oCACEF,MAAM;oCACNF,MAAM;oCACNK,OAAO;wCACLG,aAAa;oCACf;oCACAT,QAAQ;wCACN;4CACEC,MAAM;4CACND,QAAQ;gDACN;oDACEG,MAAM;oDACNF,MAAM;oDACNK,OAAO;wDACLM,OAAO;oDACT;oDACAP,OAAO;oDACPK,UAAU;gDACZ;gDACA;oDACEP,MAAM;oDACNF,MAAM;oDACNK,OAAO;wDACLM,OAAO;oDACT;oDACAP,OAAO;oDACPK,UAAU;gDACZ;6CACD;wCACH;qCACD;oCACDL,OAAO;gCACT;6BACD;4BACDA,OAAO;wBACT;qBACD;oBACDA,OAAO;gBACT;gBAEA,2BAA2B;gBAC3B;oBACEL,QAAQ;wBACN;4BACEG,MAAM;4BACNF,MAAM;4BACNK,OAAO;gCACLC,YAAY;oCACVC,OAAO;gCACT;4BACF;wBACF;wBACA;4BACEL,MAAM;4BACNF,MAAM;4BACNK,OAAO;gCACLG,aACE;gCACFE,eAAe;4BACjB;4BACAX,QAAQ;gCACN;oCACEC,MAAM;oCACND,QAAQ;wCACN;4CACEG,MAAM;4CACNF,MAAM;4CAC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G,MAAM;4CACNF,MAAM;4CACNK,OAAO;gDACLG,aAAa;gDACbG,OAAO;4CACT;4CACAP,OAAO;4CACPK,UAAU;wCACZ;wCACA;4CACEP,MAAM;4CACNF,MAAM;4CACNK,OAAO;gDACLM,OAAO;4CACT;4CACAP,OAAO;4CACPK,UAAU;wCACZ;qCACD;gCACH;gCACA;oCACET,MAAM;oCACND,QAAQ;wCACN;4CACEG,MAAM;4CACNF,MAAM;4CACNK,OAAO;gDACLM,OAAO;4CACT;4CACAC,QAAQ;4CACRT,cAAc;4CACdC,OAAO;4CACPS,SAAS;gDAAC;oDAAET,OAAO;oDAAkBU,OAAO;gDAAM;6CAAE;wCACtD;wCACA;4CACEZ,MAAM;4CACNF,MAAM;4CACNK,OAAO;gDACLG,aAAa;gDACbG,OAAO;4CACT;4CACAC,QAAQ;4CACRW,SAAS;4CACTnB,OAAO;4CACPS,SAAS;gDACP;oDAAET,OAAO;oDAAQU,OAAO;gDAAO;gDAC/B;oDAAEV,OAAO;oDAASU,OAAO;gDAAQ;6CAClC;wCACH;wCACA;4CACEZ,MAAM;4CACNF,MAAM;4CACNK,OAAO;gDACLM,OAAO;4CACT;4CACAR,cAAc;4CACdC,OAAO;wCACT;qCACD;gCACH;6BACD;4BACDA,OAAO;4BACPoB,QAAQ;gCACNC,QAAQ;gCACRC,UAAU;4BACZ;wBACF;qBACD;oBACDtB,OAAO;gBACT;aACD;QACH;KACD;IACDuB,UAAUlC;IACV+B,QAAQ;QACNC,QAAQ;QACRC,UAAU;IACZ;AACF,EAAC"}
|
|
@@ -418,7 +418,7 @@ export const googleBlock = {
|
|
|
418
418
|
RowLabel: '@ai-stack/payloadcms/client#ModelRowLabel'
|
|
419
419
|
},
|
|
420
420
|
description: 'Keep this list short. Enable only the models you actually use.',
|
|
421
|
-
initCollapsed:
|
|
421
|
+
initCollapsed: true
|
|
422
422
|
},
|
|
423
423
|
defaultValue: [
|
|
424
424
|
// Text models
|
|
@@ -469,15 +469,19 @@ export const googleBlock = {
|
|
|
469
469
|
},
|
|
470
470
|
// Image models
|
|
471
471
|
{
|
|
472
|
-
id: '
|
|
473
|
-
name: '
|
|
472
|
+
id: 'gemini-2.5-flash-image',
|
|
473
|
+
name: 'Gemini 2.5 Flash Image',
|
|
474
474
|
enabled: true,
|
|
475
|
+
responseModalities: [
|
|
476
|
+
'IMAGE'
|
|
477
|
+
],
|
|
475
478
|
useCase: 'image'
|
|
476
479
|
},
|
|
477
480
|
{
|
|
478
|
-
id: '
|
|
479
|
-
name: '
|
|
481
|
+
id: 'imagen-4.0-generate-001',
|
|
482
|
+
name: 'Imagen 4',
|
|
480
483
|
enabled: true,
|
|
484
|
+
// TODO: fix this with proper definition for multimodel or image model only
|
|
481
485
|
responseModalities: [
|
|
482
486
|
'IMAGE'
|
|
483
487
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/ai/providers/blocks/google.ts"],"sourcesContent":["import type { Block } from 'payload'\n\nimport { GoogleIcon } from '../icons.js'\n\nexport const googleBlock: Block = {\n slug: 'google',\n custom: {\n providerOptionsSchemas: {\n image: {\n fields: ['aspectRatio', 'personGeneration', 'seed', 'addWatermark'],\n },\n text: {\n fields: ['temperature', 'maxOutputTokens', 'topP', 'topK', 'safetySettings'],\n },\n tts: {\n fields: ['speed', 'volumeGainDb', 'speakingRate'],\n },\n },\n },\n fields: [\n {\n type: 'tabs',\n tabs: [\n // 1. Setup tab\n {\n fields: [\n {\n name: 'enabled',\n type: 'checkbox',\n defaultValue: true,\n label: 'Enabled',\n },\n {\n name: 'apiKey',\n type: 'text',\n admin: {\n components: {\n Field: '@ai-stack/payloadcms/client#EncryptedTextField',\n },\n description:\n 'Optional. If empty, @ai-sdk/google will use the GOOGLE_GENERATIVE_AI_API_KEY environment variable.',\n },\n label: 'API Key',\n required: false,\n },\n ],\n label: 'Setup',\n },\n\n // 2. Connection tab\n {\n fields: [\n {\n type: 'collapsible',\n admin: {\n initCollapsed: false,\n },\n fields: [\n {\n type: 'row',\n fields: [\n {\n name: 'baseURL',\n type: 'text',\n admin: {\n description:\n 'Optional. Override default API endpoint (defaults to https://generativelanguage.googleapis.com/v1beta).',\n },\n label: 'Base URL',\n },\n ],\n },\n {\n name: 'headers',\n type: 'array',\n admin: {\n description:\n 'Optional. Extra headers to send with every request, for example routing through a proxy.',\n },\n fields: [\n {\n type: 'row',\n fields: [\n {\n name: 'key',\n type: 'text',\n admin: {\n width: '50%',\n },\n label: 'Header Name',\n required: true,\n },\n {\n name: 'value',\n type: 'text',\n admin: {\n width: '50%',\n },\n label: 'Header Value',\n required: true,\n },\n ],\n },\n ],\n label: 'Custom Headers',\n },\n ],\n label: 'API & Network Settings',\n },\n ],\n label: 'Connection',\n },\n\n // 3. Voices tab (NEW)\n {\n fields: [\n {\n name: 'voices',\n type: 'array',\n admin: {\n description: 'Available voices for Gemini TTS models.',\n initCollapsed: false,\n },\n defaultValue: [\n { id: 'Puck', name: 'Puck (Upbeat)', enabled: true },\n { id: 'Charon', name: 'Charon (Informative)', enabled: true },\n { id: 'Kore', name: 'Kore (Firm)', enabled: true },\n { id: 'Fenrir', name: 'Fenrir (Excitable)', enabled: true },\n { id: 'Aoede', name: 'Aoede (Breezy)', enabled: true },\n { id: 'Zephyr', name: 'Zephyr (Bright)', enabled: true },\n ],\n fields: [\n {\n type: 'row',\n fields: [\n {\n name: 'id',\n type: 'text',\n admin: {\n description: 'Voice ID used by Google API',\n width: '40%',\n },\n label: 'Voice ID',\n required: true,\n },\n {\n name: 'name',\n type: 'text',\n admin: {\n width: '40%',\n },\n label: 'Display Name',\n required: true,\n },\n {\n name: 'enabled',\n type: 'checkbox',\n admin: {\n width: '20%',\n },\n defaultValue: true,\n label: 'Enabled',\n },\n ],\n },\n ],\n label: 'Available Voices',\n },\n ],\n label: 'Voices',\n },\n\n // 4. Provider Options (NEW - One group per use case)\n {\n fields: [\n // TTS Settings\n {\n name: 'ttsProviderOptions',\n type: 'group',\n admin: {\n description: 'Default provider options for TTS models.',\n },\n fields: [\n {\n name: 'speed',\n type: 'number',\n defaultValue: 1.0,\n label: 'Speaking Rate',\n max: 4.0,\n min: 0.25,\n },\n {\n name: 'volumeGainDb',\n type: 'number',\n defaultValue: 0,\n label: 'Volume Gain (dB)',\n },\n ],\n label: 'TTS Provider Options',\n },\n\n // Image Settings\n {\n name: 'imageProviderOptions',\n type: 'group',\n admin: {\n description: 'Default provider options for image generation models.',\n },\n fields: [\n {\n name: 'aspectRatio',\n type: 'select',\n dbName: 'google-image-aspectRatio',\n defaultValue: '1:1',\n label: 'Default Aspect Ratio',\n options: [\n { label: '1:1 (Square)', value: '1:1' },\n { label: '16:9 (Landscape)', value: '16:9' },\n { label: '9:16 (Portrait)', value: '9:16' },\n { label: '4:3', value: '4:3' },\n { label: '3:4', value: '3:4' },\n ],\n },\n {\n name: 'personGeneration',\n type: 'select',\n dbName: 'google-image-personGeneration',\n defaultValue: 'allow_adult',\n label: 'Person Generation (Imagen)',\n options: [\n { label: 'Allow Adults Only', value: 'allow_adult' },\n { label: 'Allow All', value: 'allow_all' },\n { label: 'Do Not Allow', value: 'dont_allow' },\n ],\n },\n {\n name: 'addWatermark',\n type: 'checkbox',\n defaultValue: true,\n label: 'Add SynthID Watermark',\n },\n ],\n label: 'Image Provider Options',\n },\n\n // Text Settings\n {\n name: 'textProviderOptions',\n type: 'group',\n admin: {\n description: 'Default provider options for text generation models.',\n },\n fields: [\n {\n name: 'temperature',\n type: 'number',\n defaultValue: 1.0,\n label: 'Default Temperature',\n max: 2.0,\n min: 0.0,\n },\n {\n name: 'maxOutputTokens',\n type: 'number',\n label: 'Max Output Tokens',\n },\n {\n name: 'topP',\n type: 'number',\n defaultValue: 0.95,\n label: 'Top P',\n max: 1.0,\n min: 0.0,\n },\n {\n name: 'topK',\n type: 'number',\n defaultValue: 40,\n label: 'Top K',\n },\n {\n name: 'safetySettings',\n type: 'array',\n admin: {\n description: 'Safety filter settings',\n },\n fields: [\n {\n type: 'row',\n fields: [\n {\n name: 'category',\n type: 'select',\n admin: {\n width: '50%',\n },\n dbName: 'google-safety-category',\n label: 'Category',\n options: [\n { label: 'Harassment', value: 'HARM_CATEGORY_HARASSMENT' },\n { label: 'Hate Speech', value: 'HARM_CATEGORY_HATE_SPEECH' },\n { label: 'Sexually Explicit', value: 'HARM_CATEGORY_SEXUALLY_EXPLICIT' },\n { label: 'Dangerous Content', value: 'HARM_CATEGORY_DANGEROUS_CONTENT' },\n ],\n required: true,\n },\n {\n name: 'threshold',\n type: 'select',\n admin: {\n width: '50%',\n },\n dbName: 'google-safety-threshold',\n label: 'Threshold',\n options: [\n { label: 'Block None', value: 'BLOCK_NONE' },\n { label: 'Block Low+', value: 'BLOCK_LOW_AND_ABOVE' },\n { label: 'Block Medium+', value: 'BLOCK_MEDIUM_AND_ABOVE' },\n { label: 'Block High', value: 'BLOCK_ONLY_HIGH' },\n ],\n required: true,\n },\n ],\n },\n ],\n label: 'Default Safety Settings',\n },\n ],\n label: 'Text Provider Options',\n },\n ],\n label: 'Provider Options',\n },\n\n // 5. Models tab (Simplified)\n {\n fields: [\n {\n name: 'models',\n type: 'array',\n admin: {\n components: {\n RowLabel: '@ai-stack/payloadcms/client#ModelRowLabel',\n },\n description: 'Keep this list short. Enable only the models you actually use.',\n initCollapsed: false,\n },\n defaultValue: [\n // Text models\n {\n id: 'gemini-3-pro-preview',\n name: 'Gemini 3.0 Pro (Preview)',\n enabled: true,\n responseModalities: ['TEXT'],\n useCase: 'text',\n },\n {\n id: 'gemini-2.5-pro',\n name: 'Gemini 2.5 Pro',\n enabled: true,\n responseModalities: ['TEXT'],\n useCase: 'text',\n },\n {\n id: 'gemini-2.5-flash',\n name: 'Gemini 2.5 Flash',\n enabled: true,\n responseModalities: ['TEXT'],\n useCase: 'text',\n },\n {\n id: 'gemini-1.5-pro-latest',\n name: 'Gemini 1.5 Pro (Latest)',\n enabled: true,\n responseModalities: ['TEXT'],\n useCase: 'text',\n },\n {\n id: 'gemini-1.5-flash-latest',\n name: 'Gemini 1.5 Flash (Latest)',\n enabled: true,\n responseModalities: ['TEXT'],\n useCase: 'text',\n },\n\n // Image models\n {\n id: 'imagen-3.0-generate-002',\n name: 'Imagen 3 (Fast)',\n enabled: true,\n useCase: 'image',\n },\n {\n id: 'gemini-2.5-flash-image',\n name: 'Gemini 2.5 Flash Image',\n enabled: true,\n responseModalities: ['IMAGE'],\n useCase: 'image',\n },\n {\n id: 'gemini-3-pro-image-preview',\n name: 'Gemini 3.0 Pro Image (Preview)',\n enabled: true,\n responseModalities: ['IMAGE'],\n useCase: 'image',\n },\n\n // TTS Models\n {\n id: 'gemini-2.5-pro-preview-tts',\n name: 'Gemini 2.5 Pro TTS (Preview)',\n enabled: true,\n responseModalities: ['AUDIO'],\n useCase: 'tts',\n },\n {\n id: 'gemini-2.5-flash-preview-tts',\n name: 'Gemini 2.5 Flash TTS (Preview)',\n enabled: true,\n responseModalities: ['AUDIO'],\n useCase: 'tts',\n },\n ],\n fields: [\n // Basic model info\n {\n type: 'row',\n fields: [\n {\n name: 'id',\n type: 'text',\n admin: {\n description:\n 'Exact model id as used with @ai-sdk/google.',\n width: '33%',\n },\n label: 'Model ID',\n required: true,\n },\n {\n name: 'name',\n type: 'text',\n admin: {\n width: '33%',\n },\n label: 'Display Name',\n required: true,\n },\n {\n name: 'useCase',\n type: 'select',\n admin: {\n width: '33%',\n },\n dbName: 'google-model-useCase',\n defaultValue: 'text',\n label: 'Use Case',\n options: [\n { label: 'Text', value: 'text' },\n { label: 'Image Generation', value: 'image' },\n { label: 'Text-to-Speech', value: 'tts' },\n { label: 'Embeddings', value: 'embedding' },\n ],\n },\n ],\n },\n {\n name: 'responseModalities',\n type: 'select',\n admin: {\n description: 'Output capabilities of this model',\n width: '50%',\n },\n dbName: 'google-model-modalities',\n hasMany: true,\n label: 'Response Modalities',\n options: [\n { label: 'Text', value: 'TEXT' },\n { label: 'Image', value: 'IMAGE' },\n { label: 'Audio', value: 'AUDIO' },\n ],\n },\n {\n name: 'enabled',\n type: 'checkbox',\n admin: {\n width: '50%',\n },\n defaultValue: true,\n label: 'Enabled',\n },\n ],\n label: 'Available Models',\n labels: {\n plural: 'Models',\n singular: 'Model',\n },\n },\n ],\n label: 'Models',\n },\n ],\n },\n ],\n imageURL: GoogleIcon,\n labels: {\n plural: 'Google Providers',\n singular: 'Google Gemini',\n },\n}\n"],"names":["GoogleIcon","googleBlock","slug","custom","providerOptionsSchemas","image","fields","text","tts","type","tabs","name","defaultValue","label","admin","components","Field","description","required","initCollapsed","width","id","enabled","max","min","dbName","options","value","RowLabel","responseModalities","useCase","hasMany","labels","plural","singular","imageURL"],"mappings":"AAEA,SAASA,UAAU,QAAQ,cAAa;AAExC,OAAO,MAAMC,cAAqB;IAChCC,MAAM;IACNC,QAAQ;QACNC,wBAAwB;YACtBC,OAAO;gBACLC,QAAQ;oBAAC;oBAAe;oBAAoB;oBAAQ;iBAAe;YACrE;YACAC,MAAM;gBACJD,QAAQ;oBAAC;oBAAe;oBAAmB;oBAAQ;oBAAQ;iBAAiB;YAC9E;YACAE,KAAK;gBACHF,QAAQ;oBAAC;oBAAS;oBAAgB;iBAAe;YACnD;QACF;IACF;IACAA,QAAQ;QACN;YACEG,MAAM;YACNC,MAAM;gBACJ,eAAe;gBACf;oBACEJ,QAAQ;wBACN;4BACEK,MAAM;4BACNF,MAAM;4BACNG,cAAc;4BACdC,OAAO;wBACT;wBACA;4BACEF,MAAM;4BACNF,MAAM;4BACNK,OAAO;gCACLC,YAAY;oCACVC,OAAO;gCACT;gCACAC,aACE;4BACJ;4BACAJ,OAAO;4BACPK,UAAU;wBACZ;qBACD;oBACDL,OAAO;gBACT;gBAEA,oBAAoB;gBACpB;oBACEP,QAAQ;wBACN;4BACEG,MAAM;4BACNK,OAAO;gCACLK,eAAe;4BACjB;4BACAb,QAAQ;gCACN;oCACEG,MAAM;oCACNH,QAAQ;wCACN;4CACEK,MAAM;4CACNF,MAAM;4CACNK,OAAO;gDACLG,aACE;4CACJ;4CACAJ,OAAO;wCACT;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P,MAAM;4CACNF,MAAM;4CACNK,OAAO;gDACLM,OAAO;4CACT;4CACAP,OAAO;4CACPK,UAAU;wCACZ;wCACA;4CACEP,MAAM;4CACNF,MAAM;4CACNK,OAAO;gDACLM,OAAO;4CACT;4CACAK,QAAQ;4CACRb,cAAc;4CACdC,OAAO;4CACPa,SAAS;gDACP;oDAAEb,OAAO;oDAAQc,OAAO;gDAAO;gDAC/B;oDAAEd,OAAO;oDAAoBc,OAAO;gDAAQ;gDAC5C;oDAAEd,OAAO;oDAAkBc,OAAO;gDAAM;gDACxC;oDAAEd,OAAO;oDAAcc,OAAO;gDAAY;6CAC3C;wCACH;qCACD;gCACH;gCACA;oCACEhB,MAAM;oCACNF,MAAM;oCACNK,OAAO;wCACLG,aAAa;wCACbG,OAAO;oCACT;oCACAK,QAAQ;oCACRM,SAAS;oCACTlB,OAAO;oCACPa,SAAS;wCACP;4CAAEb,OAAO;4CAAQc,OAAO;wCAAO;wCAC/B;4CAAEd,OAAO;4CAASc,OAAO;wCAAQ;wCACjC;4CAAEd,OAAO;4CAASc,OAAO;wCAAQ;qCAClC;gCACH;gCACA;oCACEhB,MAAM;oCACNF,MAAM;oCACNK,OAAO;wCACLM,OAAO;oCACT;oCACAR,cAAc;oCACdC,OAAO;gCACT;6BACD;4BACDA,OAAO;4BACPmB,QAAQ;gCACNC,QAAQ;gCACRC,UAAU;4BACZ;wBACF;qBACD;oBACDrB,OAAO;gBACT;aACD;QACH;KACD;IACDsB,UAAUnC;IACVgC,QAAQ;QACNC,QAAQ;QACRC,UAAU;IACZ;AACF,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/ai/providers/blocks/google.ts"],"sourcesContent":["import type { Block } from 'payload'\n\nimport { GoogleIcon } from '../icons.js'\n\nexport const googleBlock: Block = {\n slug: 'google',\n custom: {\n providerOptionsSchemas: {\n image: {\n fields: ['aspectRatio', 'personGeneration', 'seed', 'addWatermark'],\n },\n text: {\n fields: ['temperature', 'maxOutputTokens', 'topP', 'topK', 'safetySettings'],\n },\n tts: {\n fields: ['speed', 'volumeGainDb', 'speakingRate'],\n },\n },\n },\n fields: [\n {\n type: 'tabs',\n tabs: [\n // 1. Setup tab\n {\n fields: [\n {\n name: 'enabled',\n type: 'checkbox',\n defaultValue: true,\n label: 'Enabled',\n },\n {\n name: 'apiKey',\n type: 'text',\n admin: {\n components: {\n Field: '@ai-stack/payloadcms/client#EncryptedTextField',\n },\n description:\n 'Optional. If empty, @ai-sdk/google will use the GOOGLE_GENERATIVE_AI_API_KEY environment variable.',\n },\n label: 'API Key',\n required: false,\n },\n ],\n label: 'Setup',\n },\n\n // 2. Connection tab\n {\n fields: [\n {\n type: 'collapsible',\n admin: {\n initCollapsed: false,\n },\n fields: [\n {\n type: 'row',\n fields: [\n {\n name: 'baseURL',\n type: 'text',\n admin: {\n description:\n 'Optional. Override default API endpoint (defaults to https://generativelanguage.googleapis.com/v1beta).',\n },\n label: 'Base URL',\n },\n ],\n },\n {\n name: 'headers',\n type: 'array',\n admin: {\n description:\n 'Optional. Extra headers to send with every request, for example routing through a proxy.',\n },\n fields: [\n {\n type: 'row',\n fields: [\n {\n name: 'key',\n type: 'text',\n admin: {\n width: '50%',\n },\n label: 'Header Name',\n required: true,\n },\n {\n name: 'value',\n type: 'text',\n admin: {\n width: '50%',\n },\n label: 'Header Value',\n required: true,\n },\n ],\n },\n ],\n label: 'Custom Headers',\n },\n ],\n label: 'API & Network Settings',\n },\n ],\n label: 'Connection',\n },\n\n // 3. Voices tab (NEW)\n {\n fields: [\n {\n name: 'voices',\n type: 'array',\n admin: {\n description: 'Available voices for Gemini TTS models.',\n initCollapsed: false,\n },\n defaultValue: [\n { id: 'Puck', name: 'Puck (Upbeat)', enabled: true },\n { id: 'Charon', name: 'Charon (Informative)', enabled: true },\n { id: 'Kore', name: 'Kore (Firm)', enabled: true },\n { id: 'Fenrir', name: 'Fenrir (Excitable)', enabled: true },\n { id: 'Aoede', name: 'Aoede (Breezy)', enabled: true },\n { id: 'Zephyr', name: 'Zephyr (Bright)', enabled: true },\n ],\n fields: [\n {\n type: 'row',\n fields: [\n {\n name: 'id',\n type: 'text',\n admin: {\n description: 'Voice ID used by Google API',\n width: '40%',\n },\n label: 'Voice ID',\n required: true,\n },\n {\n name: 'name',\n type: 'text',\n admin: {\n width: '40%',\n },\n label: 'Display Name',\n required: true,\n },\n {\n name: 'enabled',\n type: 'checkbox',\n admin: {\n width: '20%',\n },\n defaultValue: true,\n label: 'Enabled',\n },\n ],\n },\n ],\n label: 'Available Voices',\n },\n ],\n label: 'Voices',\n },\n\n // 4. Provider Options (NEW - One group per use case)\n {\n fields: [\n // TTS Settings\n {\n name: 'ttsProviderOptions',\n type: 'group',\n admin: {\n description: 'Default provider options for TTS models.',\n },\n fields: [\n {\n name: 'speed',\n type: 'number',\n defaultValue: 1.0,\n label: 'Speaking Rate',\n max: 4.0,\n min: 0.25,\n },\n {\n name: 'volumeGainDb',\n type: 'number',\n defaultValue: 0,\n label: 'Volume Gain (dB)',\n },\n ],\n label: 'TTS Provider Options',\n },\n\n // Image Settings\n {\n name: 'imageProviderOptions',\n type: 'group',\n admin: {\n description: 'Default provider options for image generation models.',\n },\n fields: [\n {\n name: 'aspectRatio',\n type: 'select',\n dbName: 'google-image-aspectRatio',\n defaultValue: '1:1',\n label: 'Default Aspect Ratio',\n options: [\n { label: '1:1 (Square)', value: '1:1' },\n { label: '16:9 (Landscape)', value: '16:9' },\n { label: '9:16 (Portrait)', value: '9:16' },\n { label: '4:3', value: '4:3' },\n { label: '3:4', value: '3:4' },\n ],\n },\n {\n name: 'personGeneration',\n type: 'select',\n dbName: 'google-image-personGeneration',\n defaultValue: 'allow_adult',\n label: 'Person Generation (Imagen)',\n options: [\n { label: 'Allow Adults Only', value: 'allow_adult' },\n { label: 'Allow All', value: 'allow_all' },\n { label: 'Do Not Allow', value: 'dont_allow' },\n ],\n },\n {\n name: 'addWatermark',\n type: 'checkbox',\n defaultValue: true,\n label: 'Add SynthID Watermark',\n },\n ],\n label: 'Image Provider Options',\n },\n\n // Text Settings\n {\n name: 'textProviderOptions',\n type: 'group',\n admin: {\n description: 'Default provider options for text generation models.',\n },\n fields: [\n {\n name: 'temperature',\n type: 'number',\n defaultValue: 1.0,\n label: 'Default Temperature',\n max: 2.0,\n min: 0.0,\n },\n {\n name: 'maxOutputTokens',\n type: 'number',\n label: 'Max Output Tokens',\n },\n {\n name: 'topP',\n type: 'number',\n defaultValue: 0.95,\n label: 'Top P',\n max: 1.0,\n min: 0.0,\n },\n {\n name: 'topK',\n type: 'number',\n defaultValue: 40,\n label: 'Top K',\n },\n {\n name: 'safetySettings',\n type: 'array',\n admin: {\n description: 'Safety filter settings',\n },\n fields: [\n {\n type: 'row',\n fields: [\n {\n name: 'category',\n type: 'select',\n admin: {\n width: '50%',\n },\n dbName: 'google-safety-category',\n label: 'Category',\n options: [\n { label: 'Harassment', value: 'HARM_CATEGORY_HARASSMENT' },\n { label: 'Hate Speech', value: 'HARM_CATEGORY_HATE_SPEECH' },\n {\n label: 'Sexually Explicit',\n value: 'HARM_CATEGORY_SEXUALLY_EXPLICIT',\n },\n {\n label: 'Dangerous Content',\n value: 'HARM_CATEGORY_DANGEROUS_CONTENT',\n },\n ],\n required: true,\n },\n {\n name: 'threshold',\n type: 'select',\n admin: {\n width: '50%',\n },\n dbName: 'google-safety-threshold',\n label: 'Threshold',\n options: [\n { label: 'Block None', value: 'BLOCK_NONE' },\n { label: 'Block Low+', value: 'BLOCK_LOW_AND_ABOVE' },\n { label: 'Block Medium+', value: 'BLOCK_MEDIUM_AND_ABOVE' },\n { label: 'Block High', value: 'BLOCK_ONLY_HIGH' },\n ],\n required: true,\n },\n ],\n },\n ],\n label: 'Default Safety Settings',\n },\n ],\n label: 'Text Provider Options',\n },\n ],\n label: 'Provider Options',\n },\n\n // 5. Models tab (Simplified)\n {\n fields: [\n {\n name: 'models',\n type: 'array',\n admin: {\n components: {\n RowLabel: '@ai-stack/payloadcms/client#ModelRowLabel',\n },\n description: 'Keep this list short. Enable only the models you actually use.',\n initCollapsed: true,\n },\n defaultValue: [\n // Text models\n {\n id: 'gemini-3-pro-preview',\n name: 'Gemini 3.0 Pro (Preview)',\n enabled: true,\n responseModalities: ['TEXT'],\n useCase: 'text',\n },\n {\n id: 'gemini-2.5-pro',\n name: 'Gemini 2.5 Pro',\n enabled: true,\n responseModalities: ['TEXT'],\n useCase: 'text',\n },\n {\n id: 'gemini-2.5-flash',\n name: 'Gemini 2.5 Flash',\n enabled: true,\n responseModalities: ['TEXT'],\n useCase: 'text',\n },\n {\n id: 'gemini-1.5-pro-latest',\n name: 'Gemini 1.5 Pro (Latest)',\n enabled: true,\n responseModalities: ['TEXT'],\n useCase: 'text',\n },\n {\n id: 'gemini-1.5-flash-latest',\n name: 'Gemini 1.5 Flash (Latest)',\n enabled: true,\n responseModalities: ['TEXT'],\n useCase: 'text',\n },\n\n // Image models\n {\n id: 'gemini-2.5-flash-image',\n name: 'Gemini 2.5 Flash Image',\n enabled: true,\n responseModalities: ['IMAGE'],\n useCase: 'image',\n },\n {\n id: 'imagen-4.0-generate-001',\n name: 'Imagen 4',\n enabled: true,\n // TODO: fix this with proper definition for multimodel or image model only\n responseModalities: ['IMAGE'],\n useCase: 'image',\n },\n {\n id: 'gemini-3-pro-image-preview',\n name: 'Gemini 3.0 Pro Image (Preview)',\n enabled: true,\n responseModalities: ['IMAGE'],\n useCase: 'image',\n },\n\n // TTS Models\n {\n id: 'gemini-2.5-pro-preview-tts',\n name: 'Gemini 2.5 Pro TTS (Preview)',\n enabled: true,\n responseModalities: ['AUDIO'],\n useCase: 'tts',\n },\n {\n id: 'gemini-2.5-flash-preview-tts',\n name: 'Gemini 2.5 Flash TTS (Preview)',\n enabled: true,\n responseModalities: ['AUDIO'],\n useCase: 'tts',\n },\n ],\n fields: [\n // Basic model info\n {\n type: 'row',\n fields: [\n {\n name: 'id',\n type: 'text',\n admin: {\n description: 'Exact model id as used with @ai-sdk/google.',\n width: '33%',\n },\n label: 'Model ID',\n required: true,\n },\n {\n name: 'name',\n type: 'text',\n admin: {\n width: '33%',\n },\n label: 'Display Name',\n required: true,\n },\n {\n name: 'useCase',\n type: 'select',\n admin: {\n width: '33%',\n },\n dbName: 'google-model-useCase',\n defaultValue: 'text',\n label: 'Use Case',\n options: [\n { label: 'Text', value: 'text' },\n { label: 'Image Generation', value: 'image' },\n { label: 'Text-to-Speech', value: 'tts' },\n { label: 'Embeddings', value: 'embedding' },\n ],\n },\n ],\n },\n {\n name: 'responseModalities',\n type: 'select',\n admin: {\n description: 'Output capabilities of this model',\n width: '50%',\n },\n dbName: 'google-model-modalities',\n hasMany: true,\n label: 'Response Modalities',\n options: [\n { label: 'Text', value: 'TEXT' },\n { label: 'Image', value: 'IMAGE' },\n { label: 'Audio', value: 'AUDIO' },\n ],\n },\n {\n name: 'enabled',\n type: 'checkbox',\n admin: {\n width: '50%',\n },\n defaultValue: true,\n label: 'Enabled',\n },\n ],\n label: 'Available Models',\n labels: {\n plural: 'Models',\n singular: 'Model',\n },\n },\n ],\n label: 'Models',\n },\n ],\n },\n ],\n imageURL: GoogleIcon,\n labels: {\n plural: 'Google Providers',\n singular: 'Google Gemini',\n },\n}\n"],"names":["GoogleIcon","googleBlock","slug","custom","providerOptionsSchemas","image","fields","text","tts","type","tabs","name","defaultValue","label","admin","components","Field","description","required","initCollapsed","width","id","enabled","max","min","dbName","options","value","RowLabel","responseModalities","useCase","hasMany","labels","plural","singular","imageURL"],"mappings":"AAEA,SAASA,UAAU,QAAQ,cAAa;AAExC,OAAO,MAAMC,cAAqB;IAChCC,MAAM;IACNC,QAAQ;QACNC,wBAAwB;YACtBC,OAAO;gBACLC,QAAQ;oBAAC;oBAAe;oBAAoB;oBAAQ;iBAAe;YACrE;YACAC,MAAM;gBACJD,QAAQ;oBAAC;oBAAe;oBAAmB;oBAAQ;oBAAQ;iBAAiB;YAC9E;YACAE,KAAK;gBACHF,QAAQ;oBAAC;oBAAS;oBAAgB;iBAAe;YACnD;QACF;IACF;IACAA,QA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C;gCACH;gCACA;oCACEhB,MAAM;oCACNF,MAAM;oCACNK,OAAO;wCACLM,OAAO;oCACT;oCACAR,cAAc;oCACdC,OAAO;gCACT;6BACD;4BACDA,OAAO;4BACPmB,QAAQ;gCACNC,QAAQ;gCACRC,UAAU;4BACZ;wBACF;qBACD;oBACDrB,OAAO;gBACT;aACD;QACH;KACD;IACDsB,UAAUnC;IACVgC,QAAQ;QACNC,QAAQ;QACRC,UAAU;IACZ;AACF,EAAC"}
|
|
@@ -405,7 +405,7 @@ export const openaiBlock = {
|
|
|
405
405
|
RowLabel: '@ai-stack/payloadcms/client#ModelRowLabel'
|
|
406
406
|
},
|
|
407
407
|
description: 'Keep this list short. Enable only the models you actually use.',
|
|
408
|
-
initCollapsed:
|
|
408
|
+
initCollapsed: true
|
|
409
409
|
},
|
|
410
410
|
label: 'Available Models',
|
|
411
411
|
labels: {
|