deploy: auto commit server changes 2026-06-12 14:57:05
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\service\ai;
|
||||
|
||||
class AiAssistantRetriever
|
||||
{
|
||||
public static function retrieve(AiAssistantTrace $trace, int $userId, int $sessionId): AiAssistantTrace
|
||||
{
|
||||
$context = AiAssistantContextService::build($trace->originalMessage, $userId, $sessionId, $trace->plan);
|
||||
|
||||
$trace->retrievals = [
|
||||
'knowledge_hits' => $context['knowledge_hits'] ?? [],
|
||||
'match_items' => $context['match_items'] ?? [],
|
||||
'crypto_items' => $context['crypto_items'] ?? [],
|
||||
];
|
||||
$trace->hasContext = !empty($context['has_context']);
|
||||
|
||||
return $trace;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user