更新
This commit is contained in:
@@ -533,6 +533,13 @@ class DiagnosisAiLogic extends BaseLogic
|
||||
$retryMs = 0;
|
||||
$status = 'error';
|
||||
$upstreamStartedAt = hrtime(true);
|
||||
if ($timing !== null) {
|
||||
$priorObserver = $options['on_upstream_timing'] ?? null;
|
||||
$options['on_upstream_timing'] = static function (\app\common\service\DifyStreamTiming $stages) use ($timing, $priorObserver): void {
|
||||
$timing->logUpstream($stages);
|
||||
if (is_callable($priorObserver)) $priorObserver($stages);
|
||||
};
|
||||
}
|
||||
$forwardDelta = static function (string $delta) use (&$deliveredDelta, &$deltaCount, &$deltaBytes, $onDelta) {
|
||||
$accepted = $onDelta($delta);
|
||||
if ($accepted !== false) {
|
||||
|
||||
Reference in New Issue
Block a user