MCPcopy
hub / github.com/confident-ai/deepteam / validate_model_callback_signature

Function validate_model_callback_signature

deepteam/utils.py:23–34  ·  view source on GitHub ↗
(
    model_callback: Callable,
    async_mode: bool,
)

Source from the content-addressed store, hash-verified

21
22
23def 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
37def format_turns(turns: List[RTTurn]):

Callers 15

red_teamMethod · 0.90
assessMethod · 0.90
a_assessMethod · 0.90
assessMethod · 0.90
a_assessMethod · 0.90
assessMethod · 0.90
a_assessMethod · 0.90
assessMethod · 0.90
a_assessMethod · 0.90
assessMethod · 0.90
a_assessMethod · 0.90
assessMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected