optimize retrieve logic

This commit is contained in:
team 1
2026-04-14 11:20:31 +02:00
parent 41aadbddea
commit 406e59b0fd
2 changed files with 6 additions and 3 deletions

View File

@@ -121,9 +121,11 @@ final readonly class AgentRunner
$commerceIntent = (string)($commerceMeta['intent'] ?? CommerceIntentLite::NONE); $commerceIntent = (string)($commerceMeta['intent'] ?? CommerceIntentLite::NONE);
if ($commerceIntent === CommerceIntentLite::ADVISORY_PRODUCT_SEARCH || $commerceIntent === CommerceIntentLite::PRODUCT_SEARCH) { if ($commerceIntent === CommerceIntentLite::ADVISORY_PRODUCT_SEARCH || $commerceIntent === CommerceIntentLite::PRODUCT_SEARCH) {
//older
}
yield $this->systemMsg("Rufe Shop auf (type: " . $commerceIntent . ")", "think"); yield $this->systemMsg("Rufe Shop auf (type: " . $commerceIntent . ")", "think");
$shopResults = $swagFullOutPut ? $this->shopSearchService->search($swagFullOutPut, $commerceIntent) : ''; $shopResults = $swagFullOutPut ? $this->shopSearchService->search($swagFullOutPut, $commerceIntent) : '';
}
if ($commerceIntent === CommerceIntentLite::PRODUCT_SEARCH) { if ($commerceIntent === CommerceIntentLite::PRODUCT_SEARCH) {
$knowledgeChunks = array_slice($knowledgeChunks, 0, 2); $knowledgeChunks = array_slice($knowledgeChunks, 0, 2);

View File

@@ -42,7 +42,8 @@ final class CommerceIntentLite
'Artikel', 'Artikel',
'Gerät', 'Gerät',
'testomat', 'testomat',
'indikator' 'indikator',
'Titromat'
]; ];
foreach ($strongSignals as $signal) { foreach ($strongSignals as $signal) {