optimize retrieve logic
This commit is contained in:
@@ -121,10 +121,12 @@ 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) {
|
||||||
yield $this->systemMsg("Rufe Shop auf (type: " . $commerceIntent . ")", "think");
|
//older
|
||||||
$shopResults = $swagFullOutPut ? $this->shopSearchService->search($swagFullOutPut, $commerceIntent) : '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
yield $this->systemMsg("Rufe Shop auf (type: " . $commerceIntent . ")", "think");
|
||||||
|
$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);
|
||||||
} elseif ($commerceIntent === CommerceIntentLite::ADVISORY_PRODUCT_SEARCH) {
|
} elseif ($commerceIntent === CommerceIntentLite::ADVISORY_PRODUCT_SEARCH) {
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user