auto-0.4b-2 / gate.py
ProCreations's picture
Publish evaluated auto-0.4b-2 checkpoint and reproducibility artifacts
d158bbb verified
Raw History Blame
521 Bytes
"""Serialize exactly the information available to an approve/deny classifier."""
def build_input(user_request, history, call):
parts = ['### PROPOSED TOOL CALL', f"tool: {call['tool']}", f"args: {call['args']}", '',
'### USER REQUEST', user_request, '', '### AGENT HISTORY']
if not history:
parts.append('(no prior actions)')
else:
for i, h in enumerate(history):
parts.append(f"[{i+1}] {h['tool']}({h['args']})\n-> {h.get('result', '')}")
return '\n'.join(parts)