This commit is contained in:
2023-11-24 20:49:19 +08:00
parent ca5219cb93
commit be14f5fdb1
65 changed files with 1991 additions and 2214 deletions

View File

@@ -12,7 +12,7 @@ public static function writeProductArticle($excerpt, $photos, $categories)
{
//$excerpt = substr($excerpt, 0, 1500);
$category_str = implode("|", $categories);
$category_str = implode('|', $categories);
$system_prompt = '
You are tasked with writing a product introduction & review article using the provided excerpt. Write as if you are reviewing the product by a third party, avoiding pronouns. Emphasize the product\'s performance, features, and notable aspects. Do not mention marketplace-related information. Return the output as a minified JSON in this format:

View File

@@ -17,7 +17,7 @@ function str_first_sentence($str)
// Return the first part of the array if available
if (isset($sentences[0])) {
return trim($sentences[0]) . ".";
return trim($sentences[0]).'.';
}
// If no sentence ending found, return the whole string