(completions, **kwargs)
| 38 | return 0.0 |
| 39 | |
| 40 | def action_schema_check(completions, **kwargs): |
| 41 | global global_executor |
| 42 | futures = [global_executor.submit(_action_schema_check,completion[0]["content"],) for completion in completions] |
| 43 | scores = [] |
| 44 | for future in futures: |
| 45 | try: |
| 46 | scores.append(future.result(timeout=5)*0.3) |
| 47 | except TimeoutError as e: |
| 48 | print("Timeout while checking schema.") |
| 49 | scores.append(0.0) |
| 50 | |
| 51 | return scores |
| 52 | |
| 53 | def _action_type_check(res:str, solution: dict): |
| 54 | if isinstance(solution,str): |
nothing calls this directly
no outgoing calls
no test coverage detected