mchabrol commited on
Commit
3126e6d
·
verified ·
1 Parent(s): 57c7d55

change model

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -49,12 +49,16 @@ final_answer = FinalAnswerTool()
49
  #)
50
  class DummyModel:
51
  def __init__(self):
52
- self.last_input_token_count = 0 # pour éviter le bug `NoneType`
 
 
 
 
 
 
53
 
54
- def run(self, prompt: str):
55
- # Simule une réponse d'agent bien formée
56
  return {
57
- "text": """Thought: Je sais maintenant la réponse finale.
58
  Final Answer: 6.4"""
59
  }
60
  model = DummyModel()
 
49
  #)
50
  class DummyModel:
51
  def __init__(self):
52
+ self.last_input_token_count = 0
53
+ self.last_output_token_count = 0
54
+
55
+ def __call__(self, prompt: str):
56
+ # Simule une sortie d'agent bien structurée
57
+ self.last_input_token_count = len(prompt.split()) # juste pour simuler
58
+ self.last_output_token_count = 12 # nombre fictif
59
 
 
 
60
  return {
61
+ "text": """Thought: I now know the final answer.
62
  Final Answer: 6.4"""
63
  }
64
  model = DummyModel()