From 406e59b0fd8505cbb0d03ef3a1b9a8dc50fa32d1 Mon Sep 17 00:00:00 2001 From: team 1 Date: Tue, 14 Apr 2026 11:20:31 +0200 Subject: [PATCH] optimize retrieve logic --- src/Agent/AgentRunner.php | 6 ++++-- src/Intent/CommerceIntentLite.php | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Agent/AgentRunner.php b/src/Agent/AgentRunner.php index 5b4b975..8960481 100644 --- a/src/Agent/AgentRunner.php +++ b/src/Agent/AgentRunner.php @@ -121,10 +121,12 @@ final readonly class AgentRunner $commerceIntent = (string)($commerceMeta['intent'] ?? CommerceIntentLite::NONE); if ($commerceIntent === CommerceIntentLite::ADVISORY_PRODUCT_SEARCH || $commerceIntent === CommerceIntentLite::PRODUCT_SEARCH) { - yield $this->systemMsg("Rufe Shop auf (type: " . $commerceIntent . ")", "think"); - $shopResults = $swagFullOutPut ? $this->shopSearchService->search($swagFullOutPut, $commerceIntent) : ''; + //older } + yield $this->systemMsg("Rufe Shop auf (type: " . $commerceIntent . ")", "think"); + $shopResults = $swagFullOutPut ? $this->shopSearchService->search($swagFullOutPut, $commerceIntent) : ''; + if ($commerceIntent === CommerceIntentLite::PRODUCT_SEARCH) { $knowledgeChunks = array_slice($knowledgeChunks, 0, 2); } elseif ($commerceIntent === CommerceIntentLite::ADVISORY_PRODUCT_SEARCH) { diff --git a/src/Intent/CommerceIntentLite.php b/src/Intent/CommerceIntentLite.php index 567446b..923bd22 100644 --- a/src/Intent/CommerceIntentLite.php +++ b/src/Intent/CommerceIntentLite.php @@ -42,7 +42,8 @@ final class CommerceIntentLite 'Artikel', 'Gerät', 'testomat', - 'indikator' + 'indikator', + 'Titromat' ]; foreach ($strongSignals as $signal) {