<commit_before><?php
namespace Botamp\Botamp\Resource;

class Resource {
  protected $botamp;

  public function __construct() {
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $configHelper = $objectManager->create('\Botamp\Botamp\Helper\ConfigHelper');

    $apiKey = $configHelper->getApiKey();

    $this->botamp = new \Botamp\Client($apiKey);
    $this->botamp->setApiBase('http://localhost:3000/api');
  }
}<commit_msg>Set Botamp Api Base from magento env value if defined.<commit_after><?php
namespace Botamp\Botamp\Resource;

class Resource {
  protected $botamp;

  public function __construct() {
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $configHelper = $objectManager->create('\Botamp\Botamp\Helper\ConfigHelper');
    $configReader = $objectManager->create('\Magento\Framework\App\DeploymentConfig\Reader');

    $configData = $configReader->load(\Magento\Framework\Config\File\ConfigFilePool::APP_ENV);

    $apiKey = $configHelper->getApiKey();
    $this->botamp = new \Botamp\Client($apiKey);

    if(isset($configData['botamp']['api_base']))
        $this->botamp->setApiBase($configData['botamp']['api_base']);

  }
}
{'fraction_non_alphanumeric': 0.16153205661948378, 'fraction_numerical': 0.0033305578684429643, 'mean_word_length': 5.040201005025126, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2445866', 'n_tokens_mistral': 371, 'n_tokens_neox': 368, 'n_words': 54}