(self, tasks, survived_agent_names, statistics)
| 493 | class StepRandomEnv(CacheEnv): |
| 494 | |
| 495 | def _task_assign(self, tasks, survived_agent_names, statistics): |
| 496 | env_record, env_table = self.get_records(survived_agent_names) |
| 497 | team = env_table['Name'] |
| 498 | idx = random.randint(0, 100000) % len(team) |
| 499 | idx = self.name2idx[team[idx]] |
| 500 | if int(os.environ.get('SLEEP', 0)) > 0: |
| 501 | time.sleep(int(os.environ['SLEEP'])) |
| 502 | |
| 503 | return Response( |
| 504 | role='assistant', |
| 505 | raw=self.agents[idx].name, |
| 506 | content=self.agents[idx].name, |
| 507 | end=True, |
| 508 | usage=0, |
| 509 | cost=0, |
| 510 | ) |
| 511 | |
| 512 | |
| 513 | @dataclass |
nothing calls this directly
no test coverage detected