Give the AI subsystem one profile table and one collection, read everywhere
This commit is contained in:
@@ -100,15 +100,14 @@ vv_api_data();
|
||||
//
|
||||
// Null on any host that is not the AI host or has AI_ENABLED false, which is also what makes the
|
||||
// row absent rather than empty there. Same shape as every other optional subsystem on this page.
|
||||
// Reads the shared 'ai' cache the writer maintains and only collects on a miss. Landing here at
|
||||
// all already means the monitor cache missed; paying a second full AI collection on top of that
|
||||
// would make the slowest request on this page slower still, for figures a background writer
|
||||
// refreshed under a minute ago.
|
||||
$_vv_ai = null;
|
||||
if (vv_ai_ui_on()) {
|
||||
require_once dirname(__DIR__) . '/include/ai.php';
|
||||
$_vv_ai = [
|
||||
'model' => vv_ai_config()['model'],
|
||||
'runtime' => vv_ai_runtime_stats(),
|
||||
'index' => vv_ai_index_stats(),
|
||||
'tokens' => vv_ai_token_stats()['today'] ?? null,
|
||||
];
|
||||
$_vv_ai = vv_ai_monitor_block(vv_ai_stats_cached(isset($_GET['live'])));
|
||||
}
|
||||
|
||||
echo json_encode([
|
||||
|
||||
Reference in New Issue
Block a user