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,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) {

View File

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