Raiff1982 commited on
Commit
6a33ec9
·
verified ·
1 Parent(s): 517601a

Update AICoreAGIX_with_TB.py

Browse files
Files changed (1) hide show
  1. AICoreAGIX_with_TB.py +5 -2
AICoreAGIX_with_TB.py CHANGED
@@ -31,6 +31,7 @@ from anomaly_score import AnomalyScorer
31
  from ethics_core import EthicsCore
32
  from autonomy_engine import AutonomyEngine
33
 
 
34
  class AICoreAGIX:
35
  def __init__(self, config_path: str = "config.json"):
36
  self.ethical_filter = EthicalFilter()
@@ -49,7 +50,7 @@ class AICoreAGIX:
49
  self.ethics_core = EthicsCore()
50
  self.autonomy = AutonomyEngine()
51
 
52
- # Trust & journal
53
  self._codriao_key = self._generate_codriao_key()
54
  self._fernet_key = Fernet.generate_key()
55
  self._encrypted_codriao_key = Fernet(self._fernet_key).encrypt(self._codriao_key.encode())
@@ -219,7 +220,9 @@ class AICoreAGIX:
219
  self.speech_engine.runAndWait()
220
  except Exception as e:
221
  logger.error(f"Speech synthesis failed: {e}")
222
-
 
 
223
  async def run_tb_diagnostics(self, image_path: str, audio_path: str, user_id: int) -> Dict[str, Any]:
224
  try:
225
  result = await self.health_module.evaluate_tb_risk(image_path, audio_path, user_id)
 
31
  from ethics_core import EthicsCore
32
  from autonomy_engine import AutonomyEngine
33
 
34
+
35
  class AICoreAGIX:
36
  def __init__(self, config_path: str = "config.json"):
37
  self.ethical_filter = EthicalFilter()
 
50
  self.ethics_core = EthicsCore()
51
  self.autonomy = AutonomyEngine()
52
 
53
+ #by Trust & journal
54
  self._codriao_key = self._generate_codriao_key()
55
  self._fernet_key = Fernet.generate_key()
56
  self._encrypted_codriao_key = Fernet(self._fernet_key).encrypt(self._codriao_key.encode())
 
220
  self.speech_engine.runAndWait()
221
  except Exception as e:
222
  logger.error(f"Speech synthesis failed: {e}")
223
+ if self.autonomy.decide("can_speak"):
224
+ self._speak_response(response)
225
+
226
  async def run_tb_diagnostics(self, image_path: str, audio_path: str, user_id: int) -> Dict[str, Any]:
227
  try:
228
  result = await self.health_module.evaluate_tb_risk(image_path, audio_path, user_id)