lib/cryptum/option.rb in cryptum-0.0.352 vs lib/cryptum/option.rb in cryptum-0.0.353

- old
+ new

@@ -182,9 +182,18 @@ env = yaml_conf[:prod] env[:env] = :prod env = yaml_conf[:sandbox] if option_choice.sandbox env[:env] = :sandbox if option_choice.sandbox + open_ai_yaml_conf_file = "#{option_choice.session_root}/etc/open_ai.yaml" + if File.exist?(open_ai_yaml_conf_file) + open_ai_yaml_conf = YAML.load_file( + open_ai_yaml_conf_file, + symbolize_names: true + ) + env[:open_ai_bearer_token] = open_ai_yaml_conf[:bearer_token] + end + env rescue StandardError => e raise e end