@@ -56,8 +56,6 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
5656 }
5757
5858 private async compileGenerationFieldTemplates ( record : any , customPrompt ? : string ) {
59- console . log ( 'compileGenerationFieldTemplates customPrompt:' , JSON . parse ( customPrompt ) ) ;
60- console . log ( 'TEST RECORD' , record )
6159 return await this . compileTemplates ( customPrompt ? JSON . parse ( customPrompt ) : this . options . generateImages , record , v => String ( customPrompt ? v : v . prompt ) ) ;
6260 }
6361
@@ -109,7 +107,6 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
109107 }
110108 //create prompt for OpenAI
111109 const compiledOutputFields = await this . compileOutputFieldsTemplates ( record , customPrompt ) ;
112- console . log ( 'Compiled output fields for analysis:' , compiledOutputFields ) ;
113110 const prompt = `Analyze the following image(s) and return a single JSON in format like: {'param1': 'value1', 'param2': 'value2'}.
114111 Do NOT return array of objects. Do NOT include any Markdown, code blocks, explanations, or extra text. Only return valid JSON.
115112 Each object must contain the following fields: ${ JSON . stringify ( compiledOutputFields ) } Use the exact field names. If it's number field - return only number.
@@ -167,7 +164,6 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
167164 const record = await this . adminforth . resource ( this . resourceConfig . resourceId ) . get ( [ Filters . EQ ( primaryKeyColumn . name , selectedId ) ] ) ;
168165
169166 const compiledOutputFields = await this . compileOutputFieldsTemplatesNoImage ( record , customPrompt ) ;
170- console . log ( 'Compiled output fields for analysis:' , compiledOutputFields ) ;
171167 const prompt = `Analyze the following fields and return a single JSON in format like: {'param1': 'value1', 'param2': 'value2'}.
172168 Do NOT return array of objects. Do NOT include any Markdown, code blocks, explanations, or extra text. Only return valid JSON.
173169 Each object must contain the following fields: ${ JSON . stringify ( compiledOutputFields ) } Use the exact field names.
@@ -217,7 +213,6 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
217213 }
218214 const fieldTasks = Object . keys ( this . options ?. generateImages || { } ) . map ( async ( key ) => {
219215 const prompt = ( await this . compileGenerationFieldTemplates ( record , customPrompt ) ) [ key ] ;
220- console . log ( 'Compiled output fields for analysis:' , prompt ) ;
221216 let images ;
222217 if ( this . options . attachFiles && attachmentFiles . length === 0 ) {
223218 isError = true ;
@@ -400,11 +395,7 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
400395 } ;
401396
402397 const primaryKeyColumn = this . resourceConfig . columns . find ( ( col ) => col . primaryKey ) ;
403- const test1 = { customPrompt : "Generate me an anime girl driving tank. Test field: {{user.email}}" }
404- const test2 = { email : "Aboba" } ;
405- const re2323s = await this . compileTemplates ( test1 , test2 , v => String ( test1 ? v : v . prompt ) ) ;
406- console . log ( 'Test compileTemplates result:' , re2323s ) ;
407-
398+
408399 const pageInjection = {
409400 file : this . componentPath ( 'VisionAction.vue' ) ,
410401 meta : {
0 commit comments