BxBaseStudioAgentsVectorStoreData.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup UnaView UNA Studio Representation classes
  7. * @ingroup UnaStudio
  8. * @{
  9. */
  10. class BxBaseStudioAgentsVectorStoreData extends BxDolStudioAgentsVectorStoreData
  11. {
  12. public function __construct ($aOptions, $oTemplate = false)
  13. {
  14. parent::__construct ($aOptions, $oTemplate);
  15. }
  16. protected function _delete ($mixedId)
  17. {
  18. // TODO: delete files from vector store
  19. $mixedResult = parent::_delete($mixedId);
  20. return $mixedResult;
  21. }
  22. protected function _getCellSize ($mixedValue, $sKey, $aField, $aRow)
  23. {
  24. $mixedValue = bx_format_bytes($mixedValue);
  25. return parent::_getCellDefault ($mixedValue, $sKey, $aField, $aRow);
  26. }
  27. protected function _getCellStatus ($mixedValue, $sKey, $aField, $aRow)
  28. {
  29. $mixedValue = $mixedValue == 'processing' ? '<span title="Processing">🕚</span>' : '<span title="Completed">✅</span>';
  30. return parent::_getCellDefault ($mixedValue, $sKey, $aField, $aRow);
  31. }
  32. }
  33. /** @} */