# test_env.py from models import CustomerAction from server.app import CustomerEnvironment # Adjust this import if your env class is in a different file print("1. Booting up Environment...") env = CustomerEnvironment() print("\n2. Resetting Environment (Picking Persona)...") obs = env.reset() print(f"Customer Intent: {env.hidden_intent}") print(f"Customer Says: {obs.customer_reply}") print("\n3. Testing a Tool Call...") action_1 = CustomerAction(action_type="tool_call", content="lookup_account", tool_args={}) obs = env.step(action_1) print(f"Sandbox Reply: {obs.tool_response}") print("\n4. Testing the Judge (Ending the Call)...") action_2 = CustomerAction(action_type="end_call", content="", tool_args={}) obs = env.step(action_2) print(f"Final Reward: {obs.reward}") print(f"Judge Reasoning: {obs.metadata.get('judge_reasoning')}")