I use php and Curl to send command to API …
$SYS_Command="
Please provide an array of variants for 5 descriptive titles and 5 descriptions for the image that will be sold on stock photo websites. If necessary, please translate the user’s input to English and correct any grammar mistakes. Additionally, make adjustments to the user’s input to maximize its relevance in search results.
Please return the answer in English and provide a correctly formatted JSON array with keys ‘title’ and ‘description’. The title should have a minimum of 80 characters and a maximum of 100 characters. The input should be based on what you see in the image.";
$Sendmsg=[‘role’ => ‘system’, ‘content’ =>$SYS_Command];
$Sendmsg=[‘role’ => ‘user’, ‘content’ => ‘Sunset over blue sea’];
$data = array(‘model’ => ‘gpt-3.5-turbo’,‘messages’ => $Sendmsg,);
…
curl code ,
problem how give command or setup it that all titles and descriptions will be in correct range.
Because now I get result very chaotics: title can be from 50 - 120 symbols and description 220 - 500 symbols …
I will be Thankful for help!!!
Thansk for your time and help!