(
model_callback: Callable,
async_mode: bool,
)
| 21 | |
| 22 | |
| 23 | def validate_model_callback_signature( |
| 24 | model_callback: Callable, |
| 25 | async_mode: bool, |
| 26 | ): |
| 27 | if async_mode and not inspect.iscoroutinefunction(model_callback): |
| 28 | raise ValueError( |
| 29 | "`model_callback` must be async. `async_mode` has been set to True." |
| 30 | ) |
| 31 | if not async_mode and inspect.iscoroutinefunction(model_callback): |
| 32 | raise ValueError( |
| 33 | "`model_callback` must not be async. `async_mode` has been set to False." |
| 34 | ) |
| 35 | |
| 36 | |
| 37 | def format_turns(turns: List[RTTurn]): |
no outgoing calls
no test coverage detected