Changed environment variable behavior to accept comma separated models rather than a JSON encoded value

This commit is contained in:
Netkas 2023-07-23 16:23:17 -04:00
parent f681267999
commit caa5f66389
No known key found for this signature in database
GPG key ID: 5DAF58535614062B
3 changed files with 10 additions and 2 deletions

View file

@ -30,6 +30,14 @@
else
{
$preload = getenv('KEYBERT_PRELOAD');
if($preload === false || $preload == '')
{
$preload = null;
}
else
{
$preload = explode(',', $preload);
}
}
$keybert = new Keybert($preload, null, $port);