mirror of
https://github.com/cosmocode/dokuwiki-plugin-aichat.git
synced 2025-07-23 01:03:06 +00:00
store embedding meta data on start
This way errors during the a new embedding run will not trigger a clear index on retry
This commit is contained in:
9
cli.php
9
cli.php
@ -366,15 +366,14 @@ class cli_plugin_aichat extends AbstractCLI
|
||||
$clear = true;
|
||||
}
|
||||
|
||||
$data['embed ran at'] = dformat();
|
||||
$data['embed used'] = (string) $this->helper->getEmbeddingModel();
|
||||
$this->helper->setRunData($data);
|
||||
|
||||
$start = time();
|
||||
$this->helper->getEmbeddings()->createNewIndex($skipRE, $matchRE, $clear);
|
||||
$this->notice('Peak memory used: {memory}', ['memory' => filesize_h(memory_get_peak_usage(true))]);
|
||||
$this->notice('Spent time: {time}min', ['time' => round((time() - $start) / 60, 2)]);
|
||||
|
||||
|
||||
$data['embed ran at'] = dformat();
|
||||
$data['embed used'] = (string) $this->helper->getEmbeddingModel();
|
||||
$this->helper->setRunData($data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user