optimize data retrieve by customfields und enricher
This commit is contained in:
@@ -75,6 +75,7 @@ final readonly class PromptBuilder
|
||||
// 3) LIVE SHOP RESULTS (AUTHORITATIVE FOR PRODUCTS)
|
||||
// ------------------------------------------------------------
|
||||
$shopBlock = '';
|
||||
$isDetailed = !(count($shopResults) > 5);
|
||||
|
||||
if ($shopResults !== []) {
|
||||
$lines = [];
|
||||
@@ -113,6 +114,18 @@ final readonly class PromptBuilder
|
||||
$parts[] = "URL: " . $product->url;
|
||||
}
|
||||
|
||||
if ($product->productImage) {
|
||||
$parts[] = "productImage: " . $product->productImage;
|
||||
}
|
||||
|
||||
if ($isDetailed && $product->description) {
|
||||
$parts[] = "description: " . $product->description;
|
||||
}
|
||||
|
||||
if ($product->customFields) {
|
||||
$parts[] = "Meta-Informationen: " . $product->customFields;
|
||||
}
|
||||
|
||||
$lines[] = implode("\n", $parts);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user