set code safety on by default

This commit is contained in:
martin legrand 2025-05-01 22:10:54 +02:00
parent 68ed1834a9
commit c6688355a7

View File

@ -123,6 +123,8 @@ class Agent():
"""
start_tag = "<think>"
end_tag = "</think>"
if text is None:
return None
start_idx = text.find(start_tag)
end_idx = text.rfind(end_tag)+8
return text[start_idx:end_idx]
@ -240,7 +242,7 @@ class Agent():
if blocks != None:
for block in blocks:
self.show_block(block)
output = tool.execute([block])
output = tool.execute([block], safety=True)
feedback = tool.interpreter_feedback(output) # tool interpreter feedback
success = not tool.execution_failure_check(output)
self.blocks_result.append(executorResult(block, feedback, success, name))