mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Fix add percent to Summarize feature (#33731)
* Fix add percent to Summarize feature * fix
This commit is contained in:
committed by
GitHub
parent
8b1d8d7d19
commit
dce77a84b1
@@ -84,7 +84,10 @@ function getListForAISummarize()
|
||||
'100_w' => 'SummarizeHundredWords',
|
||||
'200_w' => 'SummarizeTwoHundredWords',
|
||||
'1_p' => 'SummarizeOneParagraphs',
|
||||
'2_p' => 'SummarizeTwoParagraphs'
|
||||
'2_p' => 'SummarizeTwoParagraphs',
|
||||
'25_pc' => 'SummarizeTwentyFivePercent',
|
||||
'50_pc' => 'SummarizeFiftyPercent',
|
||||
'75_pc' => 'SummarizeSeventyFivePercent'
|
||||
);
|
||||
|
||||
return $arrayforaisummarize;
|
||||
|
||||
@@ -231,12 +231,15 @@ class FormAI extends Form
|
||||
case 'p':
|
||||
unit = 'paragraphs';
|
||||
break;
|
||||
case 'pc':
|
||||
unit = 'percent';
|
||||
break;
|
||||
default:
|
||||
console.log('unit not found so we choose words');
|
||||
unit = 'words';
|
||||
break;
|
||||
}
|
||||
instructions = 'Summarize the following text in ' + width + ' ' + unit + ': ' + texttomodify;
|
||||
instructions = 'Summarize the following text '+ (unit == 'percent' ? 'by ' : 'in') + width + ' ' + unit + ': ' + texttomodify;
|
||||
}else {
|
||||
instructions = userprompt;
|
||||
}
|
||||
|
||||
@@ -364,6 +364,9 @@ SummarizeFiftyWords=50 words
|
||||
SummarizeHundredWords=100 words
|
||||
SummarizeTwoHundredWords=200 words
|
||||
SummarizeOneParagraphs=1 paragraph
|
||||
SummarizeTwoParagraphs=2 Paragraphs
|
||||
SummarizeTwoParagraphs=2 paragraphs
|
||||
SummarizeTwentyFivePercent=25%%
|
||||
SummarizeFiftyPercent=50%%
|
||||
SummarizeSeventyFivePercent=75%%
|
||||
TextSummarize=Text summarize
|
||||
AIEnhancements=AI Enhancements
|
||||
|
||||
Reference in New Issue
Block a user