Skip to content

Commit 7a2cba8

Browse files
committed
Merge branch 'main' of github.com:devforth/adminforth-bulk-ai-flow
2 parents 4f9b4d5 + f3c1da5 commit 7a2cba8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
165165
const record = await this.adminforth.resource(this.resourceConfig.resourceId).get( [Filters.EQ(primaryKeyColumn.name, selectedId)] );
166166

167167
const compiledOutputFields = await this.compileOutputFieldsTemplatesNoImage(record, customPrompt);
168-
const prompt = `Analyze the following fields and return a single JSON in format like: {'param1': 'value1', 'param2': 'value2'}.
169-
Do NOT return array of objects. Do NOT include any Markdown, code blocks, explanations, or extra text. Only return valid JSON.
170-
Each object must contain the following fields: ${JSON.stringify(compiledOutputFields)} Use the exact field names.
171-
If it's number field - return only number.`;
168+
const prompt = `Generate the values of fields in object by using next prompts (key is field name, value is prompt):
169+
${JSON.stringify(compiledOutputFields)} In output object use the same field names (keys) as in input.
170+
Return a single valid passable JSON object in format like: {"meta_title": "generated_value"}.
171+
Do NOT include any Markdown, code blocks, explanations, or extra text. Only return valid JSON.`;
172172
//send prompt to OpenAI and get response
173173
const numberOfTokens = this.options.fillPlainFieldsMaxTokens ? this.options.fillPlainFieldsMaxTokens : 1000;
174174
let resp: any;

0 commit comments

Comments
 (0)