SYMBOL INDEX (1469 symbols across 230 files) FILE: ci/createBadges.py function create_badges (line 9) | def create_badges() -> None: FILE: examples/jupyter-notebook/assets/jupyter-assets-custom-app.py class MathApplicationConnector (line 17) | class MathApplicationConnector(Connector): method __init__ (line 18) | def __init__(self, ep_arguments: ConnectorEndpointArguments): method load_agent (line 30) | def load_agent(self): method get_response (line 76) | async def get_response(self, prompt: str) -> ConnectorResponse: method _process_response (line 94) | async def _process_response(self, response: Any) -> str: FILE: moonshot/__main__.py function run_subprocess (line 24) | def run_subprocess(*args: Any, **kwargs: Any) -> subprocess.CompletedPro... function ms_lib_env_file (line 33) | def ms_lib_env_file(data_repo_name: str) -> None: function ms_ui_env_file (line 75) | def ms_ui_env_file(ui_repo: str) -> None: function download_nltk_resources (line 89) | def download_nltk_resources() -> None: function download_spacy_model (line 119) | def download_spacy_model() -> None: function moonshot_data_installation (line 126) | def moonshot_data_installation(unattended: bool, overwrite: bool) -> None: function check_node (line 191) | def check_node() -> bool: function moonshot_ui_installation (line 207) | def moonshot_ui_installation(unattended: bool, overwrite: bool) -> None: function run_moonshot_ui (line 267) | def run_moonshot_ui() -> None: function main (line 283) | def main() -> None: FILE: moonshot/integrations/cli/__main__.py function start_app (line 6) | def start_app(cli_command=None): FILE: moonshot/integrations/cli/benchmark/benchmark.py class BenchmarkCommandSet (line 73) | class BenchmarkCommandSet(cmd2.CommandSet): method __init__ (line 74) | def __init__(self): method do_list_cookbooks (line 82) | def do_list_cookbooks(self, args: argparse.Namespace) -> None: method do_list_recipes (line 86) | def do_list_recipes(self, args: argparse.Namespace) -> None: method do_list_results (line 90) | def do_list_results(self, args: argparse.Namespace) -> None: method do_list_runners (line 93) | def do_list_runners(self, _: cmd2.Statement) -> None: method do_list_runs (line 97) | def do_list_runs(self, args: argparse.Namespace) -> None: method do_list_metrics (line 101) | def do_list_metrics(self, args: argparse.Namespace) -> None: method do_list_datasets (line 105) | def do_list_datasets(self, args: argparse.Namespace) -> None: method do_add_cookbook (line 113) | def do_add_cookbook(self, args: argparse.Namespace) -> None: method do_add_recipe (line 117) | def do_add_recipe(self, args: argparse.Namespace) -> None: method do_delete_cookbook (line 125) | def do_delete_cookbook(self, args: argparse.Namespace) -> None: method do_delete_recipe (line 129) | def do_delete_recipe(self, args: argparse.Namespace) -> None: method do_delete_result (line 133) | def do_delete_result(self, args: argparse.Namespace) -> None: method do_delete_runner (line 137) | def do_delete_runner(self, args: argparse.Namespace) -> None: method do_delete_metric (line 141) | def do_delete_metric(self, args: argparse.Namespace) -> None: method do_delete_dataset (line 145) | def do_delete_dataset(self, args: argparse.Namespace) -> None: method do_update_cookbook (line 153) | def do_update_cookbook(self, args: argparse.Namespace) -> None: method do_update_recipe (line 157) | def do_update_recipe(self, args: argparse.Namespace) -> None: method do_run_cookbook (line 165) | def do_run_cookbook(self, args: argparse.Namespace) -> None: method do_run_recipe (line 169) | def do_run_recipe(self, args: argparse.Namespace) -> None: method do_view_cookbook (line 177) | def do_view_cookbook(self, args: argparse.Namespace) -> None: method do_view_recipe (line 181) | def do_view_recipe(self, args: argparse.Namespace) -> None: method do_view_result (line 185) | def do_view_result(self, args: argparse.Namespace) -> None: method do_view_runner (line 189) | def do_view_runner(self, args: argparse.Namespace) -> None: method do_view_run (line 193) | def do_view_run(self, args: argparse.Namespace) -> None: method do_view_metric (line 197) | def do_view_metric(self, args: argparse.Namespace) -> None: method do_view_dataset (line 201) | def do_view_dataset(self, args: argparse.Namespace) -> None: FILE: moonshot/integrations/cli/benchmark/cookbook.py function add_cookbook (line 60) | def add_cookbook(args) -> None: function list_cookbooks (line 112) | def list_cookbooks(args) -> list | None: function view_cookbook (line 174) | def view_cookbook(args) -> None: function run_cookbook (line 207) | def run_cookbook(args) -> None: function update_cookbook (line 336) | def update_cookbook(args) -> None: function delete_cookbook (line 384) | def delete_cookbook(args) -> None: function _display_cookbooks (line 429) | def _display_cookbooks(cookbooks_list): function _display_view_cookbook (line 470) | def _display_view_cookbook(cookbook_info): function _show_cookbook_results (line 538) | def _show_cookbook_results(cookbooks, endpoints, cookbook_results, durat... function _generate_cookbook_table (line 568) | def _generate_cookbook_table(cookbooks: list, endpoints: list, results: ... FILE: moonshot/integrations/cli/benchmark/datasets.py function list_datasets (line 28) | def list_datasets(args) -> list | None: function view_dataset (line 85) | def view_dataset(args) -> None: function delete_dataset (line 121) | def delete_dataset(args) -> None: function _display_datasets (line 162) | def _display_datasets(datasets_list: list): FILE: moonshot/integrations/cli/benchmark/metrics.py function list_metrics (line 23) | def list_metrics(args) -> list | None: function view_metric (line 81) | def view_metric(args) -> None: function delete_metric (line 117) | def delete_metric(args) -> None: function _display_metrics (line 154) | def _display_metrics(metrics_list: list): FILE: moonshot/integrations/cli/benchmark/recipe.py function add_recipe (line 65) | def add_recipe(args) -> None: function list_recipes (line 200) | def list_recipes(args) -> list | None: function view_recipe (line 260) | def view_recipe(args) -> None: function run_recipe (line 288) | def run_recipe(args) -> None: function update_recipe (line 416) | def update_recipe(args) -> None: function delete_recipe (line 461) | def delete_recipe(args) -> None: function _display_view_grading_scale_format (line 501) | def _display_view_grading_scale_format(title: str, grading_scale: dict) ... function _display_view_statistics_format (line 526) | def _display_view_statistics_format(title: str, stats: dict) -> str: function _display_recipes (line 559) | def _display_recipes(recipes_list: list) -> None: function _show_recipe_results (line 615) | def _show_recipe_results(recipes, endpoints, recipe_results, duration): function _generate_recipe_table (line 645) | def _generate_recipe_table(recipes: list, endpoints: list, results: dict... FILE: moonshot/integrations/cli/benchmark/result.py function list_results (line 31) | def list_results(args) -> list | None: function view_result (line 88) | def view_result(args) -> None: function delete_result (line 126) | def delete_result(args) -> None: function _display_results (line 163) | def _display_results(results_list): function _display_view_recipe_result (line 220) | def _display_view_recipe_result(result_info): function _display_view_cookbook_result (line 240) | def _display_view_cookbook_result(result_info): FILE: moonshot/integrations/cli/benchmark/run.py function list_runs (line 26) | def list_runs(args) -> list | None: function view_run (line 81) | def view_run(args) -> None: function _display_runs (line 113) | def _display_runs(runs_list: list): FILE: moonshot/integrations/cli/benchmark/runner.py function list_runners (line 28) | def list_runners() -> None: function view_runner (line 48) | def view_runner(args) -> None: function delete_runner (line 75) | def delete_runner(args) -> None: function _display_runners (line 112) | def _display_runners( FILE: moonshot/integrations/cli/cli.py class CommandLineInterface (line 20) | class CommandLineInterface(cmd2.Cmd): method __init__ (line 21) | def __init__(self): method welcome (line 26) | def welcome(self) -> None: method default (line 41) | def default(self, statement: Statement) -> None: method postcmd (line 51) | def postcmd(self, stop, line): FILE: moonshot/integrations/cli/common/common.py class CommonCommandSet (line 34) | class CommonCommandSet(cmd2.CommandSet): method __init__ (line 35) | def __init__(self): method do_list_connector_types (line 43) | def do_list_connector_types(self, args: argparse.Namespace) -> None: method do_list_endpoints (line 47) | def do_list_endpoints(self, args: argparse.Namespace) -> None: method do_list_prompt_templates (line 51) | def do_list_prompt_templates(self, args: argparse.Namespace) -> None: method do_delete_prompt_template (line 55) | def do_delete_prompt_template(self, args: argparse.Namespace) -> None: method do_add_endpoint (line 62) | def do_add_endpoint(self, args: argparse.Namespace) -> None: method do_convert_dataset (line 66) | def do_convert_dataset(self, args: argparse.Namespace) -> None: method do_download_dataset (line 70) | def do_download_dataset(self, args: argparse.Namespace) -> None: method do_delete_endpoint (line 77) | def do_delete_endpoint(self, args: argparse.Namespace) -> None: method do_update_endpoint (line 84) | def do_update_endpoint(self, args: argparse.Namespace) -> None: method do_view_endpoint (line 91) | def do_view_endpoint(self, args: argparse.Namespace) -> None: FILE: moonshot/integrations/cli/common/connectors.py function add_endpoint (line 45) | def add_endpoint(args) -> None: function list_endpoints (line 124) | def list_endpoints(args) -> list | None: function list_connector_types (line 177) | def list_connector_types(args) -> list | None: function view_endpoint (line 234) | def view_endpoint(args) -> None: function update_endpoint (line 263) | def update_endpoint(args) -> None: function delete_endpoint (line 307) | def delete_endpoint(args) -> None: function _display_connector_types (line 345) | def _display_connector_types(connector_types: list) -> None: function _display_endpoints (line 373) | def _display_endpoints(endpoints_list): FILE: moonshot/integrations/cli/common/dataset.py function list_datasets (line 27) | def list_datasets(args) -> list | None: function view_dataset (line 84) | def view_dataset(args) -> None: function delete_dataset (line 120) | def delete_dataset(args) -> None: function convert_dataset (line 158) | def convert_dataset(args) -> None: function download_dataset (line 186) | def download_dataset(args) -> None: function _display_datasets (line 217) | def _display_datasets(datasets_list: list): FILE: moonshot/integrations/cli/common/display_helper.py function display_view_list_format (line 1) | def display_view_list_format(title: str, items: list) -> str: function display_view_str_format (line 24) | def display_view_str_format(title: str, item: str) -> str: FILE: moonshot/integrations/cli/common/prompt_template.py function list_prompt_templates (line 22) | def list_prompt_templates(args) -> list | None: function delete_prompt_template (line 76) | def delete_prompt_template(args) -> None: function _display_prompt_templates (line 109) | def _display_prompt_templates(prompt_templates) -> None: FILE: moonshot/integrations/cli/initialisation/initialisation.py class InitialisationCommandSet (line 5) | class InitialisationCommandSet(cmd2.CommandSet): method __init__ (line 6) | def __init__(self): method do_interactive (line 9) | def do_interactive(self, _: cmd2.Statement) -> None: FILE: moonshot/integrations/cli/redteam/attack_module.py function list_attack_modules (line 21) | def list_attack_modules(args) -> list | None: function delete_attack_module (line 78) | def delete_attack_module(args) -> None: function _display_attack_modules (line 103) | def _display_attack_modules(attack_modules: list) -> None: FILE: moonshot/integrations/cli/redteam/context_strategy.py function use_context_strategy (line 20) | def use_context_strategy(args: argparse.Namespace) -> None: function list_context_strategies (line 57) | def list_context_strategies(args) -> list | None: function clear_context_strategy (line 89) | def clear_context_strategy() -> None: function delete_context_strategy (line 107) | def delete_context_strategy(args) -> None: function _display_context_strategies (line 129) | def _display_context_strategies(context_strategies: list) -> None: FILE: moonshot/integrations/cli/redteam/prompt_template.py function use_prompt_template (line 12) | def use_prompt_template(args: argparse.Namespace) -> None: function clear_prompt_template (line 40) | def clear_prompt_template() -> None: FILE: moonshot/integrations/cli/redteam/redteam.py class RedTeamCommandSet (line 54) | class RedTeamCommandSet(cmd2.CommandSet): method __init__ (line 55) | def __init__(self): method do_new_session (line 59) | def do_new_session(self, args: argparse.Namespace) -> None: method do_end_session (line 62) | def do_end_session(self, _: cmd2.Statement) -> None: method do_list_sessions (line 66) | def do_list_sessions(self, args: argparse.Namespace) -> None: method do_use_session (line 70) | def do_use_session(self, args: argparse.Namespace) -> None: method do_use_prompt_template (line 74) | def do_use_prompt_template(self, args: argparse.Namespace) -> None: method do_clear_prompt_template (line 77) | def do_clear_prompt_template(self, _: cmd2.Statement) -> None: method do_list_context_strategies (line 81) | def do_list_context_strategies(self, args: argparse.Namespace) -> None: method do_use_context_strategy (line 85) | def do_use_context_strategy(self, args: argparse.Namespace) -> None: method do_clear_context_strategy (line 88) | def do_clear_context_strategy(self, _: cmd2.Statement) -> None: method do_run_attack_module (line 92) | def do_run_attack_module(self, args: argparse.Namespace) -> None: method do_list_attack_modules (line 96) | def do_list_attack_modules(self, args: argparse.Namespace) -> None: method do_delete_session (line 100) | def do_delete_session(self, args: argparse.Namespace) -> None: method do_delete_context_strategy (line 104) | def do_delete_context_strategy(self, args: argparse.Namespace) -> None: method do_delete_attack_module (line 108) | def do_delete_attack_module(self, args: argparse.Namespace) -> None: method do_add_bookmark (line 112) | def do_add_bookmark(self, args: argparse.Namespace) -> None: method do_use_bookmark (line 116) | def do_use_bookmark(self, args: argparse.Namespace) -> None: method do_delete_bookmark (line 120) | def do_delete_bookmark(self, args: argparse.Namespace) -> None: method do_list_bookmarks (line 124) | def do_list_bookmarks(self, args: argparse.Namespace) -> None: method do_view_bookmark (line 128) | def do_view_bookmark(self, args: argparse.Namespace) -> None: method do_export_bookmarks (line 132) | def do_export_bookmarks(self, args: argparse.Namespace) -> None: method do_show_prompts (line 135) | def do_show_prompts(self, _: cmd2.Statement) -> None: FILE: moonshot/integrations/cli/redteam/session.py function new_session (line 48) | def new_session(args) -> None: function use_session (line 132) | def use_session(args) -> None: function show_prompts (line 167) | def show_prompts() -> None: function end_session (line 180) | def end_session() -> None: function list_sessions (line 188) | def list_sessions(args) -> list | None: function update_chat_display (line 244) | def update_chat_display() -> None: function add_bookmark (line 298) | def add_bookmark(args) -> None: function use_bookmark (line 361) | def use_bookmark(args) -> None: function delete_bookmark (line 406) | def delete_bookmark(args) -> None: function list_bookmarks (line 437) | def list_bookmarks(args) -> list | None: function _display_bookmarks (line 472) | def _display_bookmarks(bookmarks_list) -> None: function view_bookmark (line 518) | def view_bookmark(args) -> None: function _display_bookmark (line 533) | def _display_bookmark(bookmark_info: dict) -> None: function export_bookmarks (line 586) | def export_bookmarks(args) -> None: function manual_red_teaming (line 600) | def manual_red_teaming(user_prompt: str) -> None: function run_attack_module (line 657) | def run_attack_module(args): function _reload_session (line 743) | def _reload_session(runner_id: str) -> None: function delete_session (line 763) | def delete_session(args) -> None: function _display_sessions (line 792) | def _display_sessions(sessions: list) -> None: FILE: moonshot/integrations/cli/utils/process_data.py function filter_data (line 5) | def filter_data( FILE: moonshot/integrations/web_api/__main__.py function start_app (line 14) | def start_app(): FILE: moonshot/integrations/web_api/app.py class CustomFastAPI (line 32) | class CustomFastAPI(FastAPI): function monitor_tasks (line 36) | async def monitor_tasks(loop: asyncio.AbstractEventLoop): function lifespan (line 45) | async def lifespan(app: FastAPI): function log_request_origin (line 51) | async def log_request_origin( function create_app (line 60) | def create_app(cfg: providers.Configuration) -> CustomFastAPI: FILE: moonshot/integrations/web_api/container.py class Container (line 25) | class Container(containers.DeclarativeContainer): FILE: moonshot/integrations/web_api/logging_conf.py class ColorizedFormatter (line 24) | class ColorizedFormatter(logging.Formatter): method __init__ (line 33) | def __init__( method format (line 43) | def format(self, record: logging.LogRecord): function create_logging_dir (line 52) | def create_logging_dir(log_file_path: str): function configure_app_logging (line 57) | def configure_app_logging(cfg: providers.Configuration): function create_uvicorn_log_config (line 78) | def create_uvicorn_log_config(cfg: providers.Configuration) -> UvicornLo... FILE: moonshot/integrations/web_api/routes/attack_modules.py function get_all_attack_module (line 13) | def get_all_attack_module( function get_all_attack_module_metadata (line 49) | def get_all_attack_module_metadata( FILE: moonshot/integrations/web_api/routes/benchmark.py function benchmark_executor (line 16) | async def benchmark_executor( function get_benchmark_progress (line 55) | def get_benchmark_progress( function cancel_benchmark_executor (line 93) | async def cancel_benchmark_executor( FILE: moonshot/integrations/web_api/routes/benchmark_result.py function get_all_results (line 13) | async def get_all_results( function get_all_results_name (line 53) | async def get_all_results_name( function get_one_results (line 95) | async def get_one_results( function delete_result (line 137) | def delete_result( FILE: moonshot/integrations/web_api/routes/bookmark.py function insert_bookmark (line 19) | def insert_bookmark( function get_all_bookmarks (line 59) | def get_all_bookmarks( function delete_bookmark (line 99) | def delete_bookmark( function export_bookbookmarks (line 146) | def export_bookbookmarks( FILE: moonshot/integrations/web_api/routes/context_strategy.py function get_all_context_strategies (line 13) | def get_all_context_strategies( function get_all_context_strategies_name (line 54) | def get_all_context_strategies_name( function delete_context_strategy (line 95) | def delete_context_strategy( FILE: moonshot/integrations/web_api/routes/cookbook.py function create_cookbook (line 17) | def create_cookbook( function get_all_cookbooks (line 56) | def get_all_cookbooks( function get_all_cookbooks_name (line 113) | def get_all_cookbooks_name( function update_cookbook (line 150) | def update_cookbook( function delete_cookbook (line 191) | def delete_cookbook( FILE: moonshot/integrations/web_api/routes/dataset.py function upload_dataset (line 18) | async def upload_dataset( function download_dataset (line 82) | def download_dataset( function get_all_datasets (line 121) | def get_all_datasets( function get_all_datasets_name (line 157) | def get_all_datasets_name( function delete_dataset (line 193) | def delete_dataset( FILE: moonshot/integrations/web_api/routes/endpoint.py function add_new_endpoint (line 17) | def add_new_endpoint( function get_all_endpoints (line 56) | def get_all_endpoints( function get_all_endpoints_name (line 96) | def get_all_endpoints_name( function get_endpoint (line 129) | def get_endpoint( function update_endpoint (line 170) | async def update_endpoint( function delete_endpoint (line 211) | async def delete_endpoint( function get_all_connectors (line 250) | def get_all_connectors( FILE: moonshot/integrations/web_api/routes/metric.py function get_all_metrics (line 13) | def get_all_metrics( function delete_metric (line 43) | def delete_metric( FILE: moonshot/integrations/web_api/routes/prompt_template.py function get_all_prompt_templates (line 14) | def get_all_prompt_templates( function get_all_prompt_templates_names (line 52) | def get_all_prompt_templates_names( function delete_prompt_template (line 93) | def delete_prompt_template( FILE: moonshot/integrations/web_api/routes/recipe.py function create_recipe (line 17) | def create_recipe( function get_all_recipes (line 56) | def get_all_recipes( function get_all_recipes_name (line 107) | def get_all_recipes_name( function update_recipe (line 144) | async def update_recipe( function delete_recipe (line 185) | def delete_recipe( FILE: moonshot/integrations/web_api/routes/redteam.py function healthcheck (line 20) | async def healthcheck() -> dict[str, str]: function get_all_sessions (line 32) | async def get_all_sessions( function get_all_sessions_name (line 63) | async def get_all_sessions_name( function get_session_by_runner_id (line 93) | async def get_session_by_runner_id( function create_session (line 133) | async def create_session( function prompt (line 166) | async def prompt( function cancel_auto_redteam (line 205) | async def cancel_auto_redteam( function delete_session (line 237) | async def delete_session( function set_prompt_template (line 270) | async def set_prompt_template( function unset_prompt_template (line 305) | async def unset_prompt_template( function set_context_strategy (line 342) | async def set_context_strategy( function unset_context_strategy (line 381) | async def unset_context_strategy( function set_attack_module (line 418) | async def set_attack_module( function unset_attack_module (line 453) | async def unset_attack_module( function set_metric (line 488) | async def set_metric( function unset_metric (line 523) | async def unset_metric( function set_system_prompts (line 558) | async def set_system_prompts( function unset_system_prompts (line 577) | async def unset_system_prompts( function close_session (line 596) | async def close_session( FILE: moonshot/integrations/web_api/routes/runner.py function get_all_runners (line 13) | def get_all_runners( function get_all_runner_name (line 49) | def get_all_runner_name( function get_runner_by_id (line 85) | def get_runner_by_id( function delete_runner (line 124) | def delete_runner( function get_run_details_by_runner (line 163) | def get_run_details_by_runner( function get_runs_id_in_runner (line 206) | def get_runs_id_in_runner( FILE: moonshot/integrations/web_api/schemas/benchmark_runner_dto.py class BenchmarkRunnerDTO (line 4) | class BenchmarkRunnerDTO(BaseModel): FILE: moonshot/integrations/web_api/schemas/bookmark_create_dto.py class BookmarkCreateDTO (line 8) | class BookmarkCreateDTO(BookmarkPydanticModel): FILE: moonshot/integrations/web_api/schemas/cookbook_create_dto.py class CookbookCreateDTO (line 10) | class CookbookCreateDTO(CookbookPydanticModel): class CookbookUpdateDTO (line 19) | class CookbookUpdateDTO(CookbookPydanticModel): FILE: moonshot/integrations/web_api/schemas/cookbook_response_model.py class CookbookResponseModel (line 8) | class CookbookResponseModel(CookbookPydanticModel): FILE: moonshot/integrations/web_api/schemas/dataset_create_dto.py class CSV_Dataset_DTO (line 10) | class CSV_Dataset_DTO(DatasetPydanticModel): class HF_Dataset_DTO (line 20) | class HF_Dataset_DTO(DatasetPydanticModel): FILE: moonshot/integrations/web_api/schemas/dataset_response_dto.py class DatasetResponseDTO (line 4) | class DatasetResponseDTO(BaseModel): FILE: moonshot/integrations/web_api/schemas/endpoint_create_dto.py class EndpointCreateDTO (line 8) | class EndpointCreateDTO(ConnectorEndpointPydanticModel): class EndpointUpdateDTO (line 12) | class EndpointUpdateDTO(ConnectorEndpointPydanticModel): FILE: moonshot/integrations/web_api/schemas/endpoint_response_model.py class EndpointDataModel (line 6) | class EndpointDataModel(ConnectorEndpointPydanticModel): method mask_token (line 9) | def mask_token(self): FILE: moonshot/integrations/web_api/schemas/prompt_response_model.py class PromptInfo (line 6) | class PromptInfo(BaseModel): FILE: moonshot/integrations/web_api/schemas/prompt_template_response_model.py class PromptTemplate (line 4) | class PromptTemplate(BaseModel): FILE: moonshot/integrations/web_api/schemas/recipe_create_dto.py class RecipeCreateDTO (line 8) | class RecipeCreateDTO(RecipePydanticModel): class RecipeUpdateDTO (line 21) | class RecipeUpdateDTO(RecipePydanticModel): FILE: moonshot/integrations/web_api/schemas/recipe_response_model.py class RecipeResponseModel (line 6) | class RecipeResponseModel(RecipePydanticModel): FILE: moonshot/integrations/web_api/schemas/session_create_dto.py class SessionCreateDTO (line 6) | class SessionCreateDTO(BaseModel): FILE: moonshot/integrations/web_api/schemas/session_prompt_dto.py class SessionPromptDTO (line 4) | class SessionPromptDTO(BaseModel): FILE: moonshot/integrations/web_api/schemas/session_response_model.py class ChatRecord (line 6) | class ChatRecord(BaseModel): class SessionMetadataModel (line 20) | class SessionMetadataModel(BaseModel): class SessionResponseModel (line 34) | class SessionResponseModel(BaseModel): FILE: moonshot/integrations/web_api/services/attack_module_service.py class AttackModuleService (line 6) | class AttackModuleService(BaseService): method get_all_attack_module (line 8) | def get_all_attack_module(self) -> list[str]: method get_all_attack_module_metadata (line 22) | def get_all_attack_module_metadata(self) -> list[dict]: FILE: moonshot/integrations/web_api/services/auto_red_team_test_manager.py class AutoRedTeamTestManager (line 18) | class AutoRedTeamTestManager(BaseService): method __init__ (line 20) | def __init__( method generate_unique_task_id (line 38) | def generate_unique_task_id(self) -> str: method add_task (line 42) | def add_task( method remove_task (line 47) | def remove_task(self, executor_id: str) -> None: method cancel_task (line 50) | async def cancel_task(self, executor_id: str) -> None: method update_progress_status (line 53) | def update_progress_status(self, updates: RedTeamTestProgress): method on_task_completed (line 56) | def on_task_completed(self, task: asyncio.Task[Any]) -> None: method schedule_art_task (line 59) | async def schedule_art_task( method send_art_prompt (line 83) | async def send_art_prompt(self, art_args, active_runner: Runner, batch... FILE: moonshot/integrations/web_api/services/auto_red_team_test_state.py class AutoRedTeamTaskInfo (line 9) | class AutoRedTeamTaskInfo(TypedDict): class AutoRedTeamTestState (line 15) | class AutoRedTeamTestState(BaseService): method add_task (line 18) | def add_task( method remove_task (line 27) | def remove_task(self, id: str) -> AutoRedTeamTaskInfo: method cancel_task (line 30) | async def cancel_task(self, id: str) -> None: method update_progress_status (line 40) | def update_progress_status(self, updates: RedTeamTestProgress) -> None: method get_state (line 44) | def get_state(self) -> dict[str, AutoRedTeamTaskInfo]: method get_progress_status (line 47) | def get_progress_status(self, id: str) -> RedTeamTestProgress | None: method get_all_progress_status (line 52) | def get_all_progress_status(self) -> dict[str, RedTeamTestProgress]: FILE: moonshot/integrations/web_api/services/base_service.py class BaseService (line 4) | class BaseService: method __init__ (line 5) | def __init__(self) -> None: FILE: moonshot/integrations/web_api/services/benchmark_result_service.py class BenchmarkResultService (line 7) | class BenchmarkResultService(BaseService): method get_all_results (line 9) | def get_all_results(self) -> list[BenchmarkResult]: method get_all_result_name (line 14) | def get_all_result_name(self) -> list[str] | None: method get_result_by_id (line 19) | def get_result_by_id(self, result_id: str) -> BenchmarkResult: method delete_result (line 24) | def delete_result(self, result_id: str) -> None: FILE: moonshot/integrations/web_api/services/benchmark_test_manager.py class BenchmarkTestManager (line 20) | class BenchmarkTestManager(BaseService): method __init__ (line 22) | def __init__( method generate_unique_task_id (line 33) | def generate_unique_task_id(self) -> str: method add_task (line 37) | def add_task( method remove_task (line 42) | def remove_task(self, executor_id: str) -> None: method cancel_task (line 45) | async def cancel_task(self, executor_id: str) -> None: method update_progress_status (line 48) | def update_progress_status(self, updates: TestRunProgress): method on_task_completed (line 51) | def on_task_completed(self, task: asyncio.Task[Any]) -> None: method run_test (line 54) | async def run_test( method schedule_test_task (line 82) | async def schedule_test_task( FILE: moonshot/integrations/web_api/services/benchmark_test_state.py class BenchmarkTaskInfo (line 9) | class BenchmarkTaskInfo(TypedDict): class BenchmarkTestState (line 15) | class BenchmarkTestState(BaseService): method add_task (line 18) | def add_task( method remove_task (line 27) | def remove_task(self, id: str) -> BenchmarkTaskInfo: method cancel_task (line 30) | async def cancel_task(self, id: str) -> None: method update_progress_status (line 40) | def update_progress_status(self, updates: TestRunProgress) -> None: method get_state (line 43) | def get_state(self) -> dict[str, BenchmarkTaskInfo]: method get_progress_status (line 46) | def get_progress_status(self, id: str) -> TestRunProgress | None: method get_all_progress_status (line 51) | def get_all_progress_status(self) -> dict[str, TestRunProgress]: FILE: moonshot/integrations/web_api/services/benchmarking_service.py class BenchmarkingService (line 10) | class BenchmarkingService(BaseService): method __init__ (line 12) | def __init__(self, benchmark_test_manager: BenchmarkTestManager) -> None: method execute_cookbook (line 16) | async def execute_cookbook(self, cookbook_executor_data: BenchmarkRunn... method execute_recipe (line 23) | async def execute_recipe(self, recipe_executor_data: BenchmarkRunnerDTO): method cancel_executor (line 30) | async def cancel_executor(self, executor_id: str) -> None: FILE: moonshot/integrations/web_api/services/bookmark_service.py class BookmarkService (line 8) | class BookmarkService(BaseService): method insert_bookmark (line 10) | def insert_bookmark(self, bookmark_data: BookmarkCreateDTO) -> dict: method get_all_bookmarks (line 31) | def get_all_bookmarks(self, name: str | None = None) -> list[BookmarkP... method delete_bookmarks (line 53) | def delete_bookmarks(self, all: bool = False, name: str | None = None)... method export_bookmarks (line 80) | def export_bookmarks(self, export_file_name: str = "bookmarks") -> str: FILE: moonshot/integrations/web_api/services/context_strategy_service.py class ContextStrategyService (line 6) | class ContextStrategyService(BaseService): method get_ctx_strategy (line 8) | def get_ctx_strategy(self) -> list[dict]: method get_ctx_strategy_name (line 13) | def get_ctx_strategy_name(self) -> list[str]: method delete_ctx_strategy (line 18) | def delete_ctx_strategy(self, ctx_strategy_name: str) -> None: FILE: moonshot/integrations/web_api/services/cookbook_service.py class CookbookService (line 15) | class CookbookService(BaseService): method create_cookbook (line 17) | def create_cookbook(self, cookbook_data: CookbookCreateDTO) -> None: method get_all_cookbooks (line 38) | def get_all_cookbooks( method get_all_cookbooks_names (line 116) | def get_all_cookbooks_names(self) -> list[str]: method update_cookbook (line 127) | def update_cookbook( method delete_cookbook (line 145) | def delete_cookbook(self, cookbook_id: str) -> None: function get_total_prompt_and_dataset_in_cookbook (line 156) | def get_total_prompt_and_dataset_in_cookbook(cookbook: Cookbook) -> tupl... function cookbook_has_tags (line 176) | def cookbook_has_tags(tags: str, cookbook: Cookbook) -> bool: function cookbook_has_categories (line 192) | def cookbook_has_categories(categories: str, cookbook: Cookbook) -> bool: function cookbook_metrics_dependency (line 211) | def cookbook_metrics_dependency(cookbook: Cookbook) -> dict | None: FILE: moonshot/integrations/web_api/services/dataset_service.py class DatasetService (line 10) | class DatasetService(BaseService): method convert_dataset (line 12) | def convert_dataset(self, dataset_data: CSV_Dataset_DTO) -> str: method download_dataset (line 36) | def download_dataset(self, dataset_data: HF_Dataset_DTO) -> str: method get_all_datasets (line 60) | def get_all_datasets(self) -> list[DatasetResponseDTO]: method get_all_datasets_name (line 65) | def get_all_datasets_name(self) -> list[str] | None: method delete_dataset (line 70) | def delete_dataset(self, dataset_id: str) -> None: FILE: moonshot/integrations/web_api/services/endpoint_service.py class EndpointService (line 8) | class EndpointService(BaseService): method add_endpoint (line 10) | def add_endpoint(self, endpoint_data: EndpointDataModel) -> None: method get_all_endpoints (line 23) | def get_all_endpoints(self) -> list[EndpointDataModel | None]: method get_endpoint (line 39) | def get_endpoint(self, endpoint_id: str) -> EndpointDataModel | None: method get_all_endpoints_names (line 44) | def get_all_endpoints_names(self) -> list[str]: method update_endpoint (line 49) | def update_endpoint( method delete_endpoint (line 60) | def delete_endpoint(self, endpoint_id: str) -> None: method get_all_connectors (line 64) | def get_all_connectors(self) -> list[str]: FILE: moonshot/integrations/web_api/services/metric_service.py class MetricService (line 6) | class MetricService(BaseService): method get_all_metric (line 8) | def get_all_metric(self) -> list[dict]: method delete_metric (line 13) | def delete_metric(self, metric_id: str) -> None: FILE: moonshot/integrations/web_api/services/prompt_template_service.py class PromptTemplateService (line 8) | class PromptTemplateService(BaseService): method get_prompt_templates (line 10) | def get_prompt_templates(self) -> list[dict[str, Any]]: method get_prompt_templates_name (line 21) | def get_prompt_templates_name(self) -> list[str]: method delete_prompt_template (line 32) | def delete_prompt_template(self, pt_id: str): FILE: moonshot/integrations/web_api/services/recipe_service.py class RecipeService (line 10) | class RecipeService(BaseService): method create_recipe (line 12) | def create_recipe(self, recipe_data: RecipeCreateDTO) -> None: method get_all_recipes (line 31) | def get_all_recipes( method get_all_recipes_name (line 93) | def get_all_recipes_name(self) -> list[str]: method update_recipe (line 104) | def update_recipe(self, recipe_data: RecipeUpdateDTO, recipe_id: str) ... method delete_recipe (line 121) | def delete_recipe(self, recipe_id: str) -> None: function get_total_prompt_in_recipe (line 132) | def get_total_prompt_in_recipe(recipe: Recipe) -> tuple[int, int]: function get_metric_dependency_in_recipe (line 162) | def get_metric_dependency_in_recipe(recipe: Recipe) -> dict | None: FILE: moonshot/integrations/web_api/services/runner_service.py class RunnerService (line 11) | class RunnerService(BaseService): method get_all_runner (line 13) | def get_all_runner(self) -> list[dict]: method get_all_runner_name (line 24) | def get_all_runner_name(self) -> list[str]: method get_runner_by_id (line 35) | def get_runner_by_id(self, runner_id: str) -> dict | None: method delete_run (line 49) | def delete_run(self, runner_id: str) -> None: method create_runner (line 59) | def create_runner( method load_runner (line 86) | def load_runner( method get_run_details_by_runner (line 106) | def get_run_details_by_runner(self, runner_id: str, run_id: int): method get_runs_id_in_runner (line 133) | def get_runs_id_in_runner(self, runner_id) -> list[int]: FILE: moonshot/integrations/web_api/services/session_service.py class SessionService (line 20) | class SessionService(BaseService): method __init__ (line 24) | def __init__( method create_new_session (line 43) | def create_new_session( method get_all_session (line 93) | def get_all_session(self) -> list[SessionMetadataModel]: method get_all_sessions_names (line 117) | def get_all_sessions_names(self) -> list[str]: method get_session_by_runner_id (line 130) | def get_session_by_runner_id( method update_session_chat (line 168) | def update_session_chat(self, runner_id: str): method delete_session (line 186) | def delete_session(self, runner_id: str) -> None: method select_prompt_template (line 198) | def select_prompt_template(self, runner_id: str, prompt_template_name:... method select_ctx_strategy (line 213) | def select_ctx_strategy( method select_attack_module (line 234) | def select_attack_module(self, runner_id: str, attack_module_name: str... method select_metric (line 247) | def select_metric(self, runner_id: str, metric_name: str = ""): method update_system_prompt (line 260) | def update_system_prompt(self, runner_id: str, system_prompt: str = ""): method send_prompt (line 273) | async def send_prompt( method cancel_auto_redteam (line 333) | async def cancel_auto_redteam(self, runner_id: str): method end_session (line 340) | async def end_session(self, runner_id: str): FILE: moonshot/integrations/web_api/services/utils/exceptions_handler.py class ServiceException (line 7) | class ServiceException(Exception): method __init__ (line 11) | def __init__( function exception_handler (line 20) | def exception_handler(func: Callable[..., Any]) -> Callable[..., Any]: FILE: moonshot/integrations/web_api/services/utils/file_manager.py function create_temp_dir (line 8) | def create_temp_dir(temp_file_path: str): function copy_file (line 24) | def copy_file(file_path: str) -> str: FILE: moonshot/integrations/web_api/services/utils/results_formatter.py function transform_web_format (line 1) | def transform_web_format( FILE: moonshot/integrations/web_api/status_updater/interface/benchmark_progress_callback.py class InterfaceBenchmarkProgressCallback (line 6) | class InterfaceBenchmarkProgressCallback(ABC): method on_progress_update (line 13) | def on_progress_update(self, progress_data: TestRunProgress) -> None: FILE: moonshot/integrations/web_api/status_updater/interface/redteam_progress_callback.py class InterfaceRedTeamProgressCallback (line 6) | class InterfaceRedTeamProgressCallback(ABC): method on_art_progress_update (line 13) | def on_art_progress_update(self, progress_data: TestRunProgress) -> None: FILE: moonshot/integrations/web_api/status_updater/moonshot_ui_webhook.py class MoonshotUIWebhook (line 15) | class MoonshotUIWebhook( method __init__ (line 24) | def __init__( method on_progress_update (line 44) | def on_progress_update(self, progress_data: TestRunProgress) -> None: method on_art_progress_update (line 59) | def on_art_progress_update(self, progress_data: RedTeamTestProgress) -... FILE: moonshot/integrations/web_api/types/types.py class PromptDetails (line 7) | class PromptDetails(TypedDict): class EndpointChatHistory (line 19) | class EndpointChatHistory(TypedDict): class TestRunProgress (line 32) | class TestRunProgress(TypedDict): class RedTeamTestProgress (line 48) | class RedTeamTestProgress(TypedDict): class UvicornLoggingConfig (line 58) | class UvicornLoggingConfig(TypedDict): class UvicornRunArgs (line 66) | class UvicornRunArgs(TypedDict, total=False): class BenchmarkCollectionType (line 74) | class BenchmarkCollectionType(Enum): class ResultMetadata (line 79) | class ResultMetadata(TypedDict): class RequiredMetadata (line 92) | class RequiredMetadata(TypedDict): class BenchmarkResult (line 96) | class BenchmarkResult(TypedDict, RequiredMetadata, total=False): FILE: moonshot/src/api/api_bookmark.py function api_insert_bookmark (line 5) | def api_insert_bookmark( function api_get_all_bookmarks (line 50) | def api_get_all_bookmarks() -> list[dict]: function api_get_bookmark (line 60) | def api_get_bookmark(bookmark_name: str) -> dict: function api_delete_bookmark (line 73) | def api_delete_bookmark(bookmark_name: str) -> dict: function api_delete_all_bookmark (line 86) | def api_delete_all_bookmark() -> dict: function api_export_bookmarks (line 96) | def api_export_bookmarks(export_file_name: str = "bookmarks") -> str: FILE: moonshot/src/api/api_connector.py function api_create_connector_from_endpoint (line 11) | def api_create_connector_from_endpoint(ep_id: str) -> Connector: function api_create_connectors_from_endpoints (line 29) | def api_create_connectors_from_endpoints( function api_get_all_connector_type (line 48) | def api_get_all_connector_type() -> list[str]: FILE: moonshot/src/api/api_connector_endpoint.py function api_create_endpoint (line 13) | def api_create_endpoint( function api_read_endpoint (line 64) | def api_read_endpoint(ep_id: str) -> dict: function api_update_endpoint (line 80) | def api_update_endpoint(ep_id: str, **kwargs) -> bool: function api_delete_endpoint (line 120) | def api_delete_endpoint(ep_id: str) -> bool: function api_get_all_endpoint (line 138) | def api_get_all_endpoint() -> list[dict]: function api_get_all_endpoint_name (line 153) | def api_get_all_endpoint_name() -> list[str]: FILE: moonshot/src/api/api_context_strategy.py function api_get_all_context_strategies (line 9) | def api_get_all_context_strategies() -> list[str]: function api_delete_context_strategy (line 24) | def api_delete_context_strategy(cs_id: str) -> bool: function api_get_all_context_strategy_metadata (line 43) | def api_get_all_context_strategy_metadata() -> list[dict]: FILE: moonshot/src/api/api_cookbook.py function api_create_cookbook (line 12) | def api_create_cookbook(name: str, description: str, recipes: list[str])... function api_read_cookbook (line 48) | def api_read_cookbook(cb_id: str) -> dict: function api_read_cookbooks (line 65) | def api_read_cookbooks(cb_ids: conlist(str, min_length=1)) -> list[dict]: function api_update_cookbook (line 83) | def api_update_cookbook(cb_id: str, **kwargs) -> bool: function api_delete_cookbook (line 134) | def api_delete_cookbook(cb_id: str) -> bool: function api_get_all_cookbook (line 153) | def api_get_all_cookbook() -> list[dict]: function api_get_all_cookbook_name (line 168) | def api_get_all_cookbook_name() -> list[str]: FILE: moonshot/src/api/api_dataset.py function api_delete_dataset (line 14) | def api_delete_dataset(ds_id: str) -> bool: function api_get_all_datasets (line 30) | def api_get_all_datasets() -> list[dict]: function api_get_all_datasets_name (line 42) | def api_get_all_datasets_name() -> list[str]: function api_download_dataset (line 53) | def api_download_dataset( function api_convert_dataset (line 86) | def api_convert_dataset( FILE: moonshot/src/api/api_environment_variables.py function api_set_environment_variables (line 7) | def api_set_environment_variables(env_vars: dict) -> None: FILE: moonshot/src/api/api_metrics.py function api_delete_metric (line 10) | def api_delete_metric(met_id: str) -> bool: function api_get_all_metric (line 26) | def api_get_all_metric() -> list[dict]: function api_get_all_metric_name (line 40) | def api_get_all_metric_name() -> list[str]: FILE: moonshot/src/api/api_prompt_template.py function api_get_all_prompt_template_detail (line 9) | def api_get_all_prompt_template_detail() -> list[dict]: function api_get_all_prompt_template_name (line 22) | def api_get_all_prompt_template_name() -> list[str]: function api_delete_prompt_template (line 36) | def api_delete_prompt_template(pt_id: str) -> bool: FILE: moonshot/src/api/api_recipe.py function api_create_recipe (line 11) | def api_create_recipe( function api_read_recipe (line 57) | def api_read_recipe(rec_id: str) -> dict: function api_read_recipes (line 74) | def api_read_recipes(rec_ids: conlist(str, min_length=1)) -> list[dict]: function api_update_recipe (line 94) | def api_update_recipe(rec_id: str, **kwargs) -> bool: function api_delete_recipe (line 131) | def api_delete_recipe(rec_id: str) -> bool: function api_get_all_recipe (line 154) | def api_get_all_recipe() -> list[dict]: function api_get_all_recipe_name (line 168) | def api_get_all_recipe_name() -> list[str]: FILE: moonshot/src/api/api_red_teaming.py function api_get_all_attack_modules (line 9) | def api_get_all_attack_modules() -> list[str]: function api_get_all_attack_module_metadata (line 23) | def api_get_all_attack_module_metadata() -> list[dict]: function api_delete_attack_module (line 39) | def api_delete_attack_module(am_id: str) -> bool: FILE: moonshot/src/api/api_result.py function api_read_result (line 10) | def api_read_result(res_id: str) -> dict: function api_read_results (line 27) | def api_read_results(res_ids: conlist(str, min_length=1)) -> list[dict]: function api_delete_result (line 44) | def api_delete_result(res_id: str) -> bool: function api_get_all_result (line 63) | def api_get_all_result() -> list[dict]: function api_get_all_result_name (line 77) | def api_get_all_result_name() -> list[str]: FILE: moonshot/src/api/api_run.py function api_get_all_run (line 9) | def api_get_all_run(runner_id: str = "") -> list[dict]: function _api_get_available_runs (line 26) | def _api_get_available_runs( FILE: moonshot/src/api/api_runner.py function api_create_runner (line 13) | def api_create_runner( function api_load_runner (line 59) | def api_load_runner( function api_read_runner (line 80) | def api_read_runner(runner_id: str) -> dict: function api_delete_runner (line 97) | def api_delete_runner(runner_id: str) -> bool: function api_get_all_runner (line 116) | def api_get_all_runner() -> list[dict]: function api_get_all_runner_name (line 130) | def api_get_all_runner_name() -> list[str]: FILE: moonshot/src/api/api_session.py function api_load_session (line 18) | def api_load_session(runner_id: str) -> dict | None: function api_create_session (line 35) | def api_create_session( function api_get_all_session_names (line 78) | def api_get_all_session_names() -> list[str]: function api_get_available_session_info (line 92) | def api_get_available_session_info() -> tuple[list[str], list[dict]]: function api_get_all_session_metadata (line 121) | def api_get_all_session_metadata() -> list[dict]: function api_update_context_strategy (line 138) | def api_update_context_strategy(runner_id: str, context_strategy: str) -... function api_update_cs_num_of_prev_prompts (line 159) | def api_update_cs_num_of_prev_prompts(runner_id: str, num_of_prev_prompt... function api_update_prompt_template (line 180) | def api_update_prompt_template(runner_id: str, prompt_template: str) -> ... function api_update_metric (line 201) | def api_update_metric(runner_id: str, metric_id: str) -> bool: function api_update_system_prompt (line 222) | def api_update_system_prompt(runner_id: str, system_prompt: str) -> bool: function api_update_attack_module (line 243) | def api_update_attack_module(runner_id: str, attack_module_id: str) -> b... function api_delete_session (line 264) | def api_delete_session(runner_id: str) -> bool: function api_get_all_chats_from_session (line 281) | def api_get_all_chats_from_session(runner_id: str) -> dict | None: FILE: moonshot/src/bookmark/bookmark.py class Bookmark (line 15) | class Bookmark: method __new__ (line 77) | def __new__(cls, db_name="bookmark"): method __init_instance (line 96) | def __init_instance(self, db_name: str = "bookmark") -> None: method add_bookmark (line 118) | def add_bookmark(self, bookmark: BookmarkArguments) -> dict: method get_all_bookmarks (line 158) | def get_all_bookmarks(self) -> list[dict]: method get_bookmark (line 180) | def get_bookmark(self, bookmark_name: str) -> dict: method delete_bookmark (line 214) | def delete_bookmark(self, bookmark_name: str) -> dict: method delete_all_bookmark (line 264) | def delete_all_bookmark(self) -> dict: method export_bookmarks (line 287) | def export_bookmarks(self, export_file_name: str = "bookmarks") -> str: method close (line 342) | def close(self) -> None: FILE: moonshot/src/bookmark/bookmark_arguments.py class BookmarkArguments (line 8) | class BookmarkArguments(BaseModel): method from_tuple_to_dict (line 24) | def from_tuple_to_dict(cls, values: tuple) -> dict: FILE: moonshot/src/configs/env_variables.py class EnvVariables (line 13) | class EnvVariables(Enum): class EnvironmentVars (line 33) | class EnvironmentVars: method load_env (line 126) | def load_env(env_dict: dict | None = None) -> None: method get_file_path (line 162) | def get_file_path(file_type: str, file_name: str, ignore_existance: bo... method get_file_directory (line 186) | def get_file_directory(file_type: str) -> list[str]: FILE: moonshot/src/connectors/connector.py function perform_retry_callback (line 26) | def perform_retry_callback(connector_id: str, retry_state: RetryCallStat... function perform_retry (line 55) | def perform_retry(func): class Connector (line 82) | class Connector: method __init__ (line 101) | def __init__(self, ep_args: ConnectorEndpointArguments) -> None: method _add_tokens (line 139) | async def _add_tokens(self) -> None: method rate_limited (line 159) | def rate_limited(func: Callable) -> Callable: method get_response (line 196) | async def get_response(self, prompt: str) -> ConnectorResponse: method load (line 212) | def load(cls, ep_args: ConnectorEndpointArguments) -> Connector: method create (line 251) | def create(ep_args: ConnectorEndpointArguments) -> Connector: method get_available_items (line 282) | def get_available_items() -> list[str]: method get_prediction (line 311) | async def get_prediction( method set_system_prompt (line 393) | def set_system_prompt(self, system_prompt: str) -> None: FILE: moonshot/src/connectors/connector_prompt_arguments.py class ConnectorPromptArguments (line 10) | class ConnectorPromptArguments(BaseModel): class Config (line 11) | class Config: FILE: moonshot/src/connectors/connector_response.py class ConnectorResponse (line 4) | class ConnectorResponse(BaseModel): method to_dict (line 8) | def to_dict(self) -> dict: FILE: moonshot/src/connectors_endpoints/connector_endpoint.py class ConnectorEndpoint (line 17) | class ConnectorEndpoint: method create (line 37) | def create(ep_args: ConnectorEndpointArguments) -> str: method read (line 86) | def read(ep_id: constr(min_length=1)) -> ConnectorEndpointArguments: method _read_endpoint (line 123) | def _read_endpoint(ep_id: str) -> dict: method update (line 152) | def update(ep_args: ConnectorEndpointArguments) -> bool: method delete (line 194) | def delete(ep_id: constr(min_length=1)) -> bool: method get_available_items (line 222) | def get_available_items() -> tuple[list[str], list[ConnectorEndpointAr... FILE: moonshot/src/connectors_endpoints/connector_endpoint_arguments.py class ConnectorEndpointArguments (line 4) | class ConnectorEndpointArguments(BaseModel): method to_dict (line 33) | def to_dict(self) -> dict: FILE: moonshot/src/cookbooks/cookbook.py class Cookbook (line 18) | class Cookbook: method __init__ (line 19) | def __init__(self, cb_args: CookbookArguments) -> None: method load (line 28) | def load(cls, cb_id: str) -> Cookbook: method create (line 44) | def create(cb_args: CookbookArguments) -> str: method read (line 96) | def read(cb_id: str) -> CookbookArguments: method _read_cookbook (line 131) | def _read_cookbook(cb_id: str) -> dict: method update (line 152) | def update(cb_args: CookbookArguments) -> bool: method delete (line 192) | def delete(cb_id: str) -> bool: method get_available_items (line 217) | def get_available_items() -> tuple[list[str], list[CookbookArguments]]: method get_categories_in_recipes (line 253) | def get_categories_in_recipes(recipes: list[str]) -> list[str]: method get_tags_in_recipes (line 263) | def get_tags_in_recipes(recipes: list[str]) -> list[str]: FILE: moonshot/src/cookbooks/cookbook_arguments.py class CookbookArguments (line 4) | class CookbookArguments(BaseModel): method to_dict (line 19) | def to_dict(self) -> dict: FILE: moonshot/src/datasets/dataset.py class Dataset (line 20) | class Dataset: method create (line 26) | def create(ds_args: DatasetArguments) -> str: method convert_data (line 80) | def convert_data(csv_file_path: str) -> Iterator[dict]: method download_hf (line 116) | def download_hf(**hf_args) -> Iterator[dict]: method read (line 146) | def read(ds_id: str) -> DatasetArguments: method _read_dataset (line 175) | def _read_dataset(ds_id: str) -> dict: method delete (line 220) | def delete(ds_id: str) -> bool: method get_cache_information (line 246) | def get_cache_information() -> dict: method write_cache_information (line 272) | def write_cache_information(cache_info: dict) -> None: method get_available_items (line 291) | def get_available_items( method _get_or_update_dataset_info (line 350) | def _get_or_update_dataset_info( FILE: moonshot/src/datasets/dataset_arguments.py class DatasetArguments (line 6) | class DatasetArguments(BaseModel): class Config (line 7) | class Config: method to_dict (line 34) | def to_dict(self) -> dict: FILE: moonshot/src/metrics/metric.py class Metric (line 17) | class Metric: method load (line 22) | def load(cls, met_id: str) -> Metric: method delete (line 49) | def delete(met_id: str) -> bool: method get_cache_information (line 75) | def get_cache_information() -> dict: method write_cache_information (line 103) | def write_cache_information(cache_info: dict) -> None: method get_available_items (line 122) | def get_available_items() -> tuple[list[str], list[dict]]: method _get_or_update_metrics_info (line 165) | def _get_or_update_metrics_info( FILE: moonshot/src/metrics/metric_interface.py class MetricInterface (line 13) | class MetricInterface: method get_metadata (line 19) | def get_metadata(self) -> dict | None: method get_results (line 30) | async def get_results( method get_metrics_configuration (line 62) | def get_metrics_configuration(self, met_id: str) -> dict: FILE: moonshot/src/prompt_templates/prompt_template.py class PromptTemplate (line 13) | class PromptTemplate: method __init__ (line 14) | def __init__(self): method get_all_prompt_template_names (line 18) | def get_all_prompt_template_names() -> list[str]: method get_all_prompt_template_details (line 35) | def get_all_prompt_template_details() -> list[dict]: method delete (line 64) | def delete(pt_id: str) -> bool: method process_prompt_pt (line 90) | def process_prompt_pt(user_prompt: str, prompt_template_name: str) -> ... FILE: moonshot/src/recipes/recipe.py class Recipe (line 18) | class Recipe: method __init__ (line 19) | def __init__(self, rec_args: RecipeArguments) -> None: method load (line 32) | def load(cls, rec_id: str) -> Recipe: method create (line 49) | def create(rec_args: RecipeArguments) -> str: method read (line 108) | def read(rec_id: str) -> RecipeArguments: method _get_datasets_prompt_counts (line 140) | def _get_datasets_prompt_counts() -> dict: method _read_recipe (line 158) | def _read_recipe(rec_id: str, dataset_prompts_count: dict) -> dict: method update (line 205) | def update(rec_args: RecipeArguments) -> bool: method delete (line 254) | def delete(rec_id: str) -> bool: method get_available_items (line 280) | def get_available_items() -> tuple[list[str], list[RecipeArguments]]: method check_file_exists (line 319) | def check_file_exists( FILE: moonshot/src/recipes/recipe_arguments.py class RecipeArguments (line 6) | class RecipeArguments(BaseModel): method __init__ (line 36) | def __init__(self, **data: Any): method get_start_of_grading_scale (line 40) | def get_start_of_grading_scale(self, item: tuple[str, list[int]]) -> int: method validate_grading_scale (line 54) | def validate_grading_scale(self) -> None: method to_dict (line 88) | def to_dict(self) -> dict: FILE: moonshot/src/redteaming/attack/attack_module.py class AttackModule (line 27) | class AttackModule: method __init__ (line 51) | def __init__(self, am_id: str, am_arguments: AttackModuleArguments | N... method load (line 67) | def load( method get_metadata (line 98) | def get_metadata(self) -> dict: method _generate_prompts (line 108) | async def _generate_prompts( method _send_prompt_to_all_llm_default (line 170) | async def _send_prompt_to_all_llm_default(self) -> list: method _send_prompt_to_all_llm (line 204) | async def _send_prompt_to_all_llm(self, list_of_prompts: list) -> list: method _send_prompt_to_single_llm (line 263) | async def _send_prompt_to_single_llm( method _write_record_to_db (line 332) | def _write_record_to_db( method execute (line 353) | async def execute(self) -> Any: method _generate_predictions (line 363) | async def _generate_predictions( method load_modules (line 406) | def load_modules(self) -> None: method get_cache_information (line 433) | def get_cache_information() -> dict: method write_cache_information (line 459) | def write_cache_information(cache_info: dict) -> None: method get_available_items (line 478) | def get_available_items() -> tuple[list[str], list[dict]]: method _get_or_update_attack_module_info (line 523) | def _get_or_update_attack_module_info( method get_attack_module_req_and_config (line 559) | def get_attack_module_req_and_config(self) -> dict: method delete (line 599) | def delete(am_id: str) -> bool: class RedTeamingPromptArguments (line 625) | class RedTeamingPromptArguments(BaseModel): method to_tuple (line 646) | def to_tuple(self) -> tuple: method to_dict (line 674) | def to_dict(self) -> dict: FILE: moonshot/src/redteaming/attack/attack_module_arguments.py class AttackModuleArguments (line 9) | class AttackModuleArguments(BaseModel): class Config (line 10) | class Config: FILE: moonshot/src/redteaming/attack/context_strategy.py class ContextStrategy (line 15) | class ContextStrategy: method __init__ (line 16) | def __init__(self, cs_id: str) -> None: method load (line 20) | def load(cls, cs_id: str) -> ContextStrategy: method get_all_context_strategies (line 48) | def get_all_context_strategies() -> list[str]: method delete (line 68) | def delete(cs_id: str) -> bool: method process_prompt_cs (line 95) | def process_prompt_cs( FILE: moonshot/src/redteaming/context_strategy/context_strategy_interface.py class ContextStrategyInterface (line 6) | class ContextStrategyInterface: method get_metadata (line 9) | def get_metadata(self) -> dict | None: method add_in_context (line 20) | def add_in_context( method get_number_of_prev_prompts (line 36) | def get_number_of_prev_prompts(self, no_prev_prompts: int) -> int: FILE: moonshot/src/redteaming/session/chat.py class ChatRecord (line 11) | class ChatRecord: method __init__ (line 12) | def __init__( method to_dict (line 40) | def to_dict(self) -> dict[str, str]: class Chat (line 63) | class Chat: method __init__ (line 74) | def __init__( method to_dict (line 129) | def to_dict(self) -> dict[str, Union[str, list[dict[str, str]]]]: method load_chat_history (line 150) | def load_chat_history(session_db_instance: DBInterface, chat_id: str) ... method get_n_chat_history (line 179) | def get_n_chat_history( FILE: moonshot/src/redteaming/session/red_teaming_progress.py class RedTeamingProgress (line 6) | class RedTeamingProgress: method __init__ (line 9) | def __init__( method update_red_teaming_chats (line 25) | def update_red_teaming_chats( method reset_chats (line 74) | def reset_chats(self) -> None: method update_red_teaming_progress (line 80) | def update_red_teaming_progress(self) -> None: method notify_progress (line 102) | def notify_progress(self) -> None: method get_dict (line 110) | def get_dict(self) -> dict: FILE: moonshot/src/redteaming/session/red_teaming_type.py class RedTeamingType (line 4) | class RedTeamingType(Enum): FILE: moonshot/src/redteaming/session/session.py class SessionMetadata (line 26) | class SessionMetadata: method __init__ (line 28) | def __init__( method to_dict (line 52) | def to_dict(self) -> dict: method to_tuple (line 72) | def to_tuple(self) -> tuple: method from_tuple (line 93) | def from_tuple(cls, data_tuple: tuple) -> SessionMetadata: method check_type (line 129) | def check_type(self, checked_attribute: Any, expected_type: type) -> Any: class Session (line 150) | class Session: method __init__ (line 202) | def __init__( method load (line 331) | def load(database_instance: DBInterface | None) -> dict | None: method run (line 371) | async def run(self) -> list | None: method cancel (line 472) | def cancel(self) -> None: method check_redteaming_type (line 486) | def check_redteaming_type(self) -> RedTeamingType: method update_context_strategy (line 510) | def update_context_strategy( method update_cs_num_of_prev_prompts (line 544) | def update_cs_num_of_prev_prompts( method update_prompt_template (line 571) | def update_prompt_template( method update_metric (line 605) | def update_metric( method update_system_prompt (line 637) | def update_system_prompt( method update_attack_module (line 664) | def update_attack_module( method delete (line 698) | def delete(database_instance: DBInterface | None) -> bool: method get_session_chats (line 733) | def get_session_chats(database_instance: DBInterface | None) -> dict: method check_file_exists (line 761) | def check_file_exists( FILE: moonshot/src/results/result.py class Result (line 15) | class Result: method read (line 18) | def read(result_id: str) -> dict: method _read_result (line 46) | def _read_result(result_id: str) -> dict: method delete (line 70) | def delete(result_id: str) -> bool: method get_available_items (line 96) | def get_available_items() -> tuple[list[str], list[dict]]: FILE: moonshot/src/results/result_arguments.py class ResultArguments (line 8) | class ResultArguments(BaseModel): method to_dict (line 25) | def to_dict(self) -> dict: FILE: moonshot/src/runners/runner.py class Runner (line 22) | class Runner: method __init__ (line 42) | def __init__(self, runner_args: RunnerArguments) -> None: method load (line 56) | def load( method create (line 99) | def create(cls, runner_args: RunnerArguments) -> Runner: method read (line 169) | def read(runner_id: str) -> RunnerArguments: method _read_runner (line 200) | def _read_runner(runner_id: str) -> dict: method delete (line 222) | def delete(runner_id: str) -> bool: method get_available_items (line 250) | def get_available_items() -> tuple[list[str], list[RunnerArguments]]: method close (line 285) | async def close(self) -> None: method cancel (line 299) | async def cancel(self) -> None: method run_recipes (line 315) | async def run_recipes( method run_cookbooks (line 377) | async def run_cookbooks( method run_red_teaming (line 440) | async def run_red_teaming( FILE: moonshot/src/runners/runner_arguments.py class RunnerArguments (line 8) | class RunnerArguments(BaseModel): method to_dict (line 30) | def to_dict(self) -> dict: FILE: moonshot/src/runners/runner_type.py class RunnerType (line 4) | class RunnerType(Enum): FILE: moonshot/src/runs/run.py class Run (line 22) | class Run: method __init__ (line 56) | def __init__( method load (line 94) | def load(database_instance: DBInterface | None, run_id: int | None) ->... method get_all_runs (line 134) | def get_all_runs(database_instance: DBInterface) -> list[RunArguments]: method cancel (line 168) | def cancel(self) -> None: method run (line 181) | async def run(self) -> ResultArguments | None: method _load_module (line 325) | def _load_module(self, arg_key: str, env_var: str): FILE: moonshot/src/runs/run_arguments.py class RunArguments (line 13) | class RunArguments(BaseModel): class Config (line 14) | class Config: method to_dict (line 45) | def to_dict(self) -> dict: method to_create_tuple (line 74) | def to_create_tuple(self) -> tuple: method to_tuple (line 89) | def to_tuple(self) -> tuple: method _to_tuple (line 105) | def _to_tuple(self, include_run_id: bool) -> tuple: method from_tuple (line 155) | def from_tuple(cls, run_record: tuple) -> RunArguments: FILE: moonshot/src/runs/run_progress.py class RunProgress (line 13) | class RunProgress: method __init__ (line 20) | def __init__( method notify_error (line 36) | def notify_error(self, error_message: str) -> None: method notify_progress (line 53) | def notify_progress(self, **kwargs) -> None: method get_dict (line 123) | def get_dict(self) -> dict: FILE: moonshot/src/runs/run_status.py class RunStatus (line 4) | class RunStatus(Enum): FILE: moonshot/src/storage/db_interface.py class DBInterface (line 7) | class DBInterface: method create_connection (line 9) | def create_connection(self) -> Any | None: method close_connection (line 20) | def close_connection(self) -> None: method create_table (line 28) | def create_table(self, create_table_sql: str) -> None: method create_record (line 42) | def create_record(self, record: tuple, create_record_sql: str) -> None: method read_record (line 57) | def read_record(self, record: tuple, read_record_sql: str) -> tuple | ... method read_records (line 72) | def read_records(self, read_records_sql: str) -> list[tuple] | None: method update_record (line 89) | def update_record(self, record: tuple, update_record_sql: str) -> None: method delete_records_in_table (line 104) | def delete_records_in_table(self, delete_record_sql: str) -> None: method check_database_table_exists (line 118) | def check_database_table_exists(self, table_name: str) -> bool: method delete_database_table (line 131) | def delete_database_table(self, delete_table_sql: str) -> None: FILE: moonshot/src/storage/io_interface.py class IOInterface (line 5) | class IOInterface: method create_file (line 7) | def create_file(self, data: dict) -> Any | None: method create_file_with_iterator (line 20) | def create_file_with_iterator( method read_file (line 37) | def read_file(self, filepath: str) -> dict | None: FILE: moonshot/src/storage/storage.py class Config (line 16) | class Config: class Storage (line 20) | class Storage: method create_object (line 23) | def create_object( method create_object_with_iterator (line 69) | def create_object_with_iterator( method read_object_with_iterator (line 121) | def read_object_with_iterator( method read_object (line 175) | def read_object( method delete_object (line 212) | def delete_object(obj_type: str, obj_id: str, obj_extension: str) -> b... method count_objects (line 235) | def count_objects( method get_objects (line 260) | def get_objects(obj_type: str, obj_extension: str) -> Iterator[str]: method get_creation_datetime (line 282) | def get_creation_datetime( method get_file_hash (line 305) | def get_file_hash(obj_type: str, obj_id: str, obj_extension: str) -> str: method get_filepath (line 328) | def get_filepath( method is_object_exists (line 353) | def is_object_exists(obj_type: str, obj_id: str, obj_extension: str) -... method create_database_connection (line 372) | def create_database_connection( method close_database_connection (line 413) | def close_database_connection(database_instance: DBInterface) -> None: method create_database_table (line 429) | def create_database_table( method create_database_record (line 451) | def create_database_record( method read_database_record (line 475) | def read_database_record( method read_database_records (line 499) | def read_database_records( method update_database_record (line 523) | def update_database_record( method delete_database_record_in_table (line 546) | def delete_database_record_in_table( method check_database_table_exists (line 570) | def check_database_table_exists( method delete_database_table (line 593) | def delete_database_table( FILE: moonshot/src/utils/find_feature.py function find_keyword (line 4) | def find_keyword( FILE: moonshot/src/utils/import_modules.py function create_module_spec (line 8) | def create_module_spec(module_name: str, module_file_path: str) -> None ... function import_module_from_spec (line 42) | def import_module_from_spec(module_spec: ModuleSpec) -> ModuleType | None: function get_instance (line 60) | def get_instance(id: str, filepath: str) -> Any: FILE: moonshot/src/utils/log.py function configure_logger (line 6) | def configure_logger(name: str): FILE: moonshot/src/utils/pagination.py function get_paginated_lists (line 1) | def get_paginated_lists(page_size: int, list_of_items: list) -> list: FILE: moonshot/src/utils/timeit.py function timeit (line 10) | def timeit(func): FILE: tests/others/functest_connectors.py function test_create_connector_endpoint (line 17) | def test_create_connector_endpoint(): function test_read_connector_endpoint (line 30) | def test_read_connector_endpoint(): function test_update_connector_endpoint (line 34) | def test_update_connector_endpoint(): function test_delete_connector_endpoint (line 40) | def test_delete_connector_endpoint(): function test_get_all_connector_endpoint (line 56) | def test_get_all_connector_endpoint(): function test_get_all_connector_endpoint_name (line 60) | def test_get_all_connector_endpoint_name(): function test_create_connector_from_ep (line 64) | def test_create_connector_from_ep(): function test_create_connectors_from_eps (line 90) | def test_create_connectors_from_eps(): function test_get_all_connector_type (line 120) | def test_get_all_connector_type(): function test_run_connector_endpoints_api (line 124) | def test_run_connector_endpoints_api(): function test_run_connector_api (line 157) | def test_run_connector_api(): FILE: tests/others/functest_cookbooks.py function test_create_cookbook (line 15) | def test_create_cookbook(): function test_read_cookbook (line 23) | def test_read_cookbook(): function test_read_cookbooks (line 27) | def test_read_cookbooks(): function test_update_cookbook (line 37) | def test_update_cookbook(): function test_delete_cookbook (line 45) | def test_delete_cookbook(): function test_get_all_cookbook (line 61) | def test_get_all_cookbook(): function test_get_all_cookbook_name (line 65) | def test_get_all_cookbook_name(): function test_run_cookbook_api (line 69) | def test_run_cookbook_api(): FILE: tests/others/functest_datasets.py function test_delete_datasets (line 7) | def test_delete_datasets(): function test_get_all_datasets (line 28) | def test_get_all_datasets(): function test_get_all_datasets_name (line 32) | def test_get_all_datasets_name(): function test_run_datasets_api (line 36) | def test_run_datasets_api(): FILE: tests/others/functest_metrics.py function test_get_all_metrics (line 7) | def test_get_all_metrics(): function test_delete_metric (line 12) | def test_delete_metric(): function test_run_metric_api (line 32) | def test_run_metric_api(): FILE: tests/others/functest_recipes.py function test_create_recipe (line 15) | def test_create_recipe(): function test_read_recipe (line 35) | def test_read_recipe(): function test_read_recipes (line 39) | def test_read_recipes(): function test_update_recipe (line 47) | def test_update_recipe(): function test_delete_recipe (line 58) | def test_delete_recipe(): function test_get_all_recipe (line 74) | def test_get_all_recipe(): function test_get_all_recipe_name (line 78) | def test_get_all_recipe_name(): function test_run_recipe_api (line 82) | def test_run_recipe_api(): FILE: tests/others/functest_results.py function test_read_result (line 15) | def test_read_result(): function test_read_results (line 29) | def test_read_results(): function test_delete_result (line 39) | def test_delete_result(): function test_get_all_result (line 62) | def test_get_all_result(): function test_get_all_result_name (line 66) | def test_get_all_result_name(): function test_run_result_api (line 70) | def test_run_result_api(): FILE: tests/others/functest_rt_api.py function test_create_runner (line 30) | def test_create_runner(name: str): function runner_callback_fn (line 38) | def runner_callback_fn(progress_args: dict): function run_manual_and_automated_rt (line 43) | def run_manual_and_automated_rt(): function run_manual_rt (line 103) | def run_manual_rt(): function run_automated_rt (line 137) | def run_automated_rt(): function test_art_and_cancel (line 178) | def test_art_and_cancel(): function test_session_apis (line 216) | def test_session_apis(runner_id: str): function test_attack_apis (line 255) | def test_attack_apis(): FILE: tests/others/functest_runner.py function runner_callback_fn (line 12) | def runner_callback_fn(progress_args: dict): function test_create_runner (line 17) | def test_create_runner(name: str): function test_load_runner (line 34) | def test_load_runner(runner_id: str): function test_run_benchmark_recipe_runner_and_cancel (line 46) | def test_run_benchmark_recipe_runner_and_cancel(runner_id: str): function test_run_benchmark_cookbook_runner_and_cancel (line 66) | def test_run_benchmark_cookbook_runner_and_cancel(runner_id: str): function test_run_benchmark_recipe_runner (line 86) | def test_run_benchmark_recipe_runner(runner_id: str): function test_run_benchmark_cookbook_runner (line 98) | def test_run_benchmark_cookbook_runner(runner_id: str): function test_run_automated_redteaming_runner (line 110) | def test_run_automated_redteaming_runner(runner_id: str): function test_read_runner (line 129) | def test_read_runner(runner_id: str): function test_delete_runner (line 132) | def test_delete_runner(runner_id: str): function test_get_all_runner (line 147) | def test_get_all_runner(): function test_get_all_runner_name (line 150) | def test_get_all_runner_name(): function test_run_runner_api (line 156) | def test_run_runner_api(): function test_get_all_run (line 201) | def test_get_all_run(runner_id: str): function test_run_api (line 204) | def test_run_api(): FILE: tests/unit-tests/cli/test_attack_module.py class TestCollectionCliAttackModule (line 10) | class TestCollectionCliAttackModule: method init (line 12) | def init(self): method test_list_attack_modules (line 406) | def test_list_attack_modules(self, FILE: tests/unit-tests/cli/test_common_endpoints.py class TestCollectionCliConnectors (line 21) | class TestCollectionCliConnectors: method init (line 23) | def init(self): method test_add_endpoint (line 529) | def test_add_endpoint( method test_list_endpoints (line 973) | def test_list_endpoints( method test_list_endpoints_filtered (line 1191) | def test_list_endpoints_filtered( method test_view_endpoints (line 1289) | def test_view_endpoints( method test_update_endpoint (line 1438) | def test_update_endpoint( method test_delete_endpoint (line 1516) | def test_delete_endpoint( method test_delete_endpoint_confirm_yes (line 1542) | def test_delete_endpoint_confirm_yes(self, mock_delete, mock_input): method test_delete_endpoint_confirm_no (line 1557) | def test_delete_endpoint_confirm_no(self, mock_delete, mock_input): method test_delete_endpoint_cancelled_output (line 1573) | def test_delete_endpoint_cancelled_output( method test_list_connector_type (line 1846) | def test_list_connector_type( method test_list_connector_types_filtered (line 2003) | def test_list_connector_types_filtered( FILE: tests/unit-tests/cli/test_common_prompt_template.py class TestCollectionCliPromptTemplate (line 11) | class TestCollectionCliPromptTemplate: method init (line 13) | def init(self): method test_list_prompt_templates (line 331) | def test_list_prompt_templates( method test_list_prompt_templates_filtered (line 652) | def test_list_prompt_templates_filtered( method test_delete_prompt_template (line 736) | def test_delete_prompt_template(self, mock_api_delete_prompt_template,... method test_delete_prompt_template_confirm_yes (line 755) | def test_delete_prompt_template_confirm_yes(self, mock_delete, mock_in... method test_delete_prompt_template_confirm_no (line 766) | def test_delete_prompt_template_confirm_no(self, mock_delete, mock_inp... method test_delete_prompt_template_cancelled_output (line 778) | def test_delete_prompt_template_cancelled_output(self, mock_delete, mo... FILE: tests/unit-tests/cli/test_cookbook.py class TestCollectionCliCookbook (line 16) | class TestCollectionCliCookbook: method init (line 40) | def init(self): method test_add_cookbook (line 267) | def test_add_cookbook( method test_list_cookbooks (line 553) | def test_list_cookbooks( method test_list_cookbooks_filtered (line 648) | def test_list_cookbooks_filtered( method test_view_cookbook (line 802) | def test_view_cookbook( method test_run_cookbook (line 1562) | def test_run_cookbook( method test_update_cookbook (line 1776) | def test_update_cookbook( method test_delete_cookbook (line 1858) | def test_delete_cookbook( method test_delete_cookbook_confirm_yes (line 1886) | def test_delete_cookbook_confirm_yes(self, mock_delete, mock_input): method test_delete_cookbook_confirm_no (line 1901) | def test_delete_cookbook_confirm_no(self, mock_delete, mock_input): method test_delete_cookbook_cancelled_output (line 1917) | def test_delete_cookbook_cancelled_output( FILE: tests/unit-tests/cli/test_datasets.py class TestCollectionCliDataset (line 12) | class TestCollectionCliDataset: method init (line 40) | def init(self): method test_list_datasets (line 283) | def test_list_datasets( method test_list_datasets_filtered (line 378) | def test_list_datasets_filtered( method test_view_dataset (line 499) | def test_view_dataset( method test_delete_dataset (line 587) | def test_delete_dataset( method test_delete_dataset_confirm_yes (line 615) | def test_delete_dataset_confirm_yes(self, mock_delete, mock_input): method test_delete_dataset_confirm_no (line 630) | def test_delete_dataset_confirm_no(self, mock_delete, mock_input): method test_delete_dataset_cancelled_output (line 646) | def test_delete_dataset_cancelled_output(self, mock_delete, mock_print... FILE: tests/unit-tests/cli/test_metrics.py class TestCollectionCliMetrics (line 12) | class TestCollectionCliMetrics: method init (line 30) | def init(self): method test_list_metrics (line 273) | def test_list_metrics( method test_list_metrics_filtered (line 368) | def test_list_metrics_filtered( method test_view_metric (line 489) | def test_view_metric( method test_delete_metric (line 577) | def test_delete_metric( method test_delete_metric_confirm_yes (line 605) | def test_delete_metric_confirm_yes(self, mock_delete, mock_input): method test_delete_metric_confirm_no (line 620) | def test_delete_metric_confirm_no(self, mock_delete, mock_input): method test_delete_metric_cancelled_output (line 636) | def test_delete_metric_cancelled_output(self, mock_delete, mock_print,... FILE: tests/unit-tests/cli/test_recipe.py class TestCollectionCliRecipe (line 16) | class TestCollectionCliRecipe: method init (line 60) | def init(self): method test_add_recipe (line 929) | def test_add_recipe( method test_list_recipes (line 1208) | def test_list_recipes( method test_list_recipes_filtered (line 1303) | def test_list_recipes_filtered( method test_view_recipe (line 1406) | def test_view_recipe( method test_run_recipe (line 2166) | def test_run_recipe( method test_update_recipe (line 2380) | def test_update_recipe( method test_delete_recipe (line 2462) | def test_delete_recipe( method test_delete_recipe_confirm_yes (line 2488) | def test_delete_recipe_confirm_yes(self, mock_delete, mock_input): method test_delete_recipe_confirm_no (line 2501) | def test_delete_recipe_confirm_no(self, mock_delete, mock_input): method test_delete_recipe_cancelled_output (line 2515) | def test_delete_recipe_cancelled_output(self, mock_delete, mock_print,... FILE: tests/unit-tests/cli/test_red_teaming.py function cli (line 15) | def cli(): function run_command (line 18) | def run_command(cli: CommandLineInterface, command_list: list = []): function run_command_table (line 22) | def run_command_table(cli, command): function perform_assertion (line 27) | def perform_assertion(cli, command_list, expected_output, capsys): function perform_assertion_function_output (line 35) | def perform_assertion_function_output(expected_output, returned_results,... class TestRedTeamingCLI (line 47) | class TestRedTeamingCLI: method init (line 49) | def init(self): method test_new_session (line 254) | def test_new_session(self, cli, command_list, expected_output, capsys): method test_use_session (line 288) | def test_use_session(self, cli, command_list, expected_output, capsys): method test_set_context_strategy (line 325) | def test_set_context_strategy(self, cli, command_list, expected_output... method test_set_prompt_template (line 351) | def test_set_prompt_template(self, cli, command_list, expected_output,... method test_clear_context_strategy (line 376) | def test_clear_context_strategy(self, cli, command_list, expected_outp... method test_clear_prompt_template (line 402) | def test_clear_prompt_template(self, cli, command_list, expected_outpu... method test_list_attack_modules (line 434) | def test_list_attack_modules(self, cli, command_list, expected_output,... method test_list_attack_modules_output (line 447) | def test_list_attack_modules_output(self, function_args, expected_outp... method test_list_context_strategies (line 482) | def test_list_context_strategies(self, cli, command_list, expected_out... method test_list_context_strategies_output (line 495) | def test_list_context_strategies_output(self, function_args, expected_... method test_list_sessions (line 534) | def test_list_sessions(self, cli, command_list, expected_output, capsys): method test_list_sessions_output (line 548) | def test_list_sessions_output(self, function_args, expected_output, ca... method test_automated_red_teaming (line 659) | def test_automated_red_teaming(self, cli, command_list, expected_outpu... FILE: tests/unit-tests/cli/test_result.py class TestCollectionCliResult (line 12) | class TestCollectionCliResult: method init (line 256) | def init(self): method test_list_results (line 499) | def test_list_results( method test_list_results_filtered (line 594) | def test_list_results_filtered( method test_view_result (line 766) | def test_view_result( method test_delete_result (line 854) | def test_delete_result( method test_delete_result_confirm_yes (line 880) | def test_delete_result_confirm_yes(self, mock_delete, mock_input): method test_delete_result_confirm_no (line 893) | def test_delete_result_confirm_no(self, mock_delete, mock_input): method test_delete_result_cancelled_output (line 907) | def test_delete_result_cancelled_output(self, mock_delete, mock_print,... FILE: tests/unit-tests/cli/test_run.py class TestCollectionCliRun (line 9) | class TestCollectionCliRun: method init (line 58) | def init(self): method test_list_runs (line 301) | def test_list_runs( method test_list_runs_filtered (line 396) | def test_list_runs_filtered( method test_view_run (line 499) | def test_view_run( FILE: tests/unit-tests/cli/test_runner.py class TestCollectionCliRunner (line 12) | class TestCollectionCliRunner: method init (line 86) | def init(self): method test_view_runner (line 233) | def test_view_runner( method test_delete_runner (line 351) | def test_delete_runner( method test_delete_runner_confirm_yes (line 377) | def test_delete_runner_confirm_yes(self, mock_delete, mock_input): method test_delete_runner_confirm_no (line 390) | def test_delete_runner_confirm_no(self, mock_delete, mock_input): method test_delete_runner_cancelled_output (line 404) | def test_delete_runner_cancelled_output(self, mock_delete, mock_print,... FILE: tests/unit-tests/cli/test_session.py class TestCollectionCliSession (line 10) | class TestCollectionCliSession: method init (line 12) | def init(self): method test_new_session_create_runner (line 164) | def test_new_session_create_runner(self, mock_api_load_session, mock_a... method test_new_session_load_runner (line 291) | def test_new_session_load_runner(self, mock_api_load_session, mock_api... method test_use_session (line 348) | def test_use_session(self, mock_api_load_session, mock_api_load_runner... method test_delete_session (line 411) | def test_delete_session(self, mock_api_delete_session, argparse_value,... method test_delete_session_confirm_yes (line 429) | def test_delete_session_confirm_yes(self, mock_api_delete_session, moc... method test_delete_session_confirm_no (line 440) | def test_delete_session_confirm_no(self, mock_api_delete_session, mock... method test_delete_session_confirm_cancelled (line 452) | def test_delete_session_confirm_cancelled(self, mock_api_delete_sessio... method test_list_sessions (line 850) | def test_list_sessions(self, FILE: tests/unit-tests/common/samples/add_previous_prompt.py class SampleContextStrategy (line 7) | class SampleContextStrategy(ContextStrategyInterface): method __init__ (line 14) | def __init__(self, cs_id: str): method get_metadata (line 20) | def get_metadata(self) -> dict | None: method add_in_context (line 32) | def add_in_context( FILE: tests/unit-tests/common/samples/advglue.py class AdvGlueExactMatch (line 8) | class AdvGlueExactMatch(MetricInterface): method __init__ (line 9) | def __init__(self): method get_metadata (line 19) | def get_metadata(self) -> dict | None: method get_results (line 31) | async def get_results( FILE: tests/unit-tests/common/samples/benchmarking-result.py class BenchmarkingResult (line 14) | class BenchmarkingResult: method generate (line 15) | def generate(self, runner_results: ResultArguments) -> ResultArguments... method _generate_metadata (line 71) | def _generate_metadata(self, results_args: ResultArguments) -> dict: method _generate_result (line 105) | def _generate_result(self, result_args: ResultArguments) -> dict: method _generate_cookbooks_result (line 143) | def _generate_cookbooks_result(self, cookbooks: list[str], results: di... method _initialize_cookbook_dict (line 170) | def _initialize_cookbook_dict(self, cookbook: str) -> dict: method _populate_cookbook_details_and_summary (line 190) | def _populate_cookbook_details_and_summary( method _get_worst_grade (line 241) | def _get_worst_grade( method _generate_recipes_result (line 282) | def _generate_recipes_result(self, recipes: list[str], results: dict) ... method _get_unique_sets (line 321) | def _get_unique_sets( method _initialize_recipe_dict (line 347) | def _initialize_recipe_dict(self, recipe: str, recipe_grading_scale: d... method _populate_recipe_details_and_summary (line 371) | def _populate_recipe_details_and_summary( method _calculate_prompts_and_grades (line 421) | def _calculate_prompts_and_grades( method _get_grading_criteria_value (line 484) | def _get_grading_criteria_value(self, metrics: list[dict]) -> float | ... method _determine_grade (line 511) | def _determine_grade( FILE: tests/unit-tests/common/samples/benchmarking.py class Benchmarking (line 35) | class Benchmarking: method generate (line 48) | async def generate( method _run_cookbook (line 262) | async def _run_cookbook(self, cookbook_name: str) -> dict: method _run_recipe (line 345) | async def _run_recipe(self, recipe_name: str) -> dict: method _run_generator_pipeline (line 519) | async def _run_generator_pipeline(self, cancel_event: asyncio.Event) -... method _generate_prompts (line 636) | async def _generate_prompts(self) -> AsyncGenerator[PromptArguments, N... method _get_dataset_prompts (line 715) | async def _get_dataset_prompts( method _yield_prompt_arguments (line 757) | async def _yield_prompt_arguments( method _generate_predictions (line 798) | async def _generate_predictions( method _process_single_prompt (line 841) | async def _process_single_prompt( class PromptArguments (line 922) | class PromptArguments(BaseModel): method to_tuple (line 939) | def to_tuple(self) -> tuple: method from_tuple (line 970) | def from_tuple(cls, cache_record: tuple) -> PromptArguments: FILE: tests/unit-tests/common/samples/bertscore.py class BertScore (line 9) | class BertScore(MetricInterface): method __init__ (line 16) | def __init__(self): method get_metadata (line 22) | def get_metadata(self) -> dict | None: method get_results (line 34) | async def get_results( FILE: tests/unit-tests/common/samples/bleuscore.py class BleuScore (line 10) | class BleuScore(MetricInterface): method __init__ (line 11) | def __init__(self): method get_metadata (line 17) | def get_metadata(self) -> dict | None: method get_results (line 29) | async def get_results( FILE: tests/unit-tests/common/samples/charswap_attack.py class CharSwapGenerator (line 15) | class CharSwapGenerator(AttackModule): method __init__ (line 16) | def __init__(self, am_id: str, am_arguments: AttackModuleArguments | N... method get_metadata (line 26) | def get_metadata(self) -> dict: method get_n_random (line 43) | def get_n_random(self, low: int, high: int, n: int) -> list: method execute (line 57) | async def execute(self): method perform_attack_manually (line 68) | async def perform_attack_manually(self) -> list: FILE: tests/unit-tests/common/samples/claude2-connector.py class Claude2Connector (line 16) | class Claude2Connector(Connector): method __init__ (line 17) | def __init__(self, ep_arguments: ConnectorEndpointArguments): method get_response (line 29) | async def get_response(self, prompt: str) -> str: method _process_response (line 54) | async def _process_response(self, response: Completion) -> str: FILE: tests/unit-tests/common/samples/exactstrmatch.py class ExactStrMatch (line 8) | class ExactStrMatch(MetricInterface): method __init__ (line 9) | def __init__(self): method get_metadata (line 18) | def get_metadata(self) -> dict | None: method get_results (line 30) | async def get_results( FILE: tests/unit-tests/common/samples/homoglyph_attack.py class HomoglyphGenerator (line 12) | class HomoglyphGenerator(AttackModule): method __init__ (line 13) | def __init__(self, am_id: str, am_arguments: AttackModuleArguments | N... method get_metadata (line 24) | def get_metadata(self) -> dict: method execute (line 41) | async def execute(self): method perform_attack_manually (line 52) | async def perform_attack_manually(self) -> list: FILE: tests/unit-tests/common/samples/huggingface-connector.py class HuggingFaceConnector (line 15) | class HuggingFaceConnector(Connector): method __init__ (line 16) | def __init__(self, ep_arguments: ConnectorEndpointArguments): method get_response (line 22) | async def get_response(self, prompt: str) -> str: method _prepare_headers (line 42) | def _prepare_headers(self) -> dict: method _process_response (line 59) | async def _process_response(self, response: ClientResponse) -> str: FILE: tests/unit-tests/common/samples/ign_test_storage.py class ObjectInstance (line 11) | class ObjectInstance: method __init__ (line 12) | def __init__(self, obj_filepath: str): method create_file (line 15) | def create_file(self, obj_info: dict) -> bool: method read_file_iterator (line 19) | def read_file_iterator( method read_file (line 26) | def read_file(self) -> bool: class TestCollectionStorage (line 30) | class TestCollectionStorage: method init (line 37) | def init(self): method test_create_object (line 552) | def test_create_object( method test_create_object_exceptions (line 790) | def test_create_object_exceptions( method test_read_object_with_iterator (line 884) | def test_read_object_with_iterator( method test_read_object_with_iterator_invalid_filepath (line 1182) | def test_read_object_with_iterator_invalid_filepath( method test_read_object_with_iterator_exceptions (line 1402) | def test_read_object_with_iterator_exceptions( method test_read_object (line 1504) | def test_read_object( method test_read_object_invalid_filepath (line 1797) | def test_read_object_invalid_filepath( method test_read_object_exceptions (line 1988) | def test_read_object_exceptions( method test_delete_object (line 2068) | def test_delete_object( method test_is_object_exists (line 2152) | def test_is_object_exists( method test_get_objects (line 2226) | def test_get_objects(self, mocker, obj_type, obj_extension, expected_d... method test_get_objects_invalid_arguments (line 2397) | def test_get_objects_invalid_arguments( FILE: tests/unit-tests/common/samples/openai-connector.py class OpenAIConnector (line 14) | class OpenAIConnector(Connector): method __init__ (line 15) | def __init__(self, ep_arguments: ConnectorEndpointArguments): method get_response (line 30) | async def get_response(self, prompt: str) -> str: method _process_response (line 64) | async def _process_response(self, response: Any) -> str: FILE: tests/unit-tests/common/samples/redteaming.py class RedTeaming (line 29) | class RedTeaming: method generate (line 56) | async def generate( method run_automated_red_teaming (line 100) | async def run_automated_red_teaming(self): method run_manual_red_teaming (line 175) | async def run_manual_red_teaming(self) -> dict: method _generate_prompts (line 220) | async def _generate_prompts( method _generate_predictions (line 278) | async def _generate_predictions( method _write_record_to_db (line 313) | def _write_record_to_db( method load_modules (line 332) | def load_modules(self) -> None: class RedTeamingPromptArguments (line 354) | class RedTeamingPromptArguments(BaseModel): method to_tuple (line 369) | def to_tuple(self) -> tuple: method to_dict (line 396) | def to_dict(self) -> dict: FILE: tests/unit-tests/common/samples/sample_attack_module.py class SampleAttackModule (line 5) | class SampleAttackModule(AttackModule): method __init__ (line 6) | def __init__(self, am_id: str, am_arguments: AttackModuleArguments | N... method get_metadata (line 12) | def get_metadata(self) -> dict: method execute (line 29) | async def execute(self): method perform_attack_manually (line 40) | async def perform_attack_manually(self) -> list: FILE: tests/unit-tests/common/samples/sample_file.py class OpenAIConnector (line 15) | class OpenAIConnector(Connector): method __init__ (line 16) | def __init__(self, ep_arguments: ConnectorEndpointArguments): method get_response (line 28) | async def get_response(self, prompt: str) -> str: method _process_response (line 62) | async def _process_response(self, response: Any) -> str: FILE: tests/unit-tests/src/data/databases-modules/sqlite.py class SQLite (line 6) | class SQLite(DBInterface): method __init__ (line 7) | def __init__(self, db_path: str): method create_connection (line 11) | def create_connection(self) -> bool: method close_connection (line 36) | def close_connection(self) -> None: method create_table (line 57) | def create_table(self, create_table_sql: str) -> None: method create_record (line 80) | def create_record(self, record: tuple, create_record_sql: str) -> tupl... method read_record (line 118) | def read_record(self, record: tuple, read_record_sql: str) -> tuple | ... method read_records (line 146) | def read_records(self, read_records_sql: str) -> list[tuple] | None: method update_record (line 171) | def update_record(self, record: tuple, update_record_sql: str) -> None: method delete_record_by_id (line 195) | def delete_record_by_id(self, record_id: int, delete_record_sql: str) ... method delete_records_in_table (line 220) | def delete_records_in_table(self, delete_record_sql: str) -> None: method check_database_table_exists (line 244) | def check_database_table_exists(self, table_name: str) -> bool | None: method delete_database_table (line 273) | def delete_database_table(self, delete_table_sql: str) -> None: FILE: tests/unit-tests/src/data/io-modules/jsonio.py class JsonIO (line 9) | class JsonIO(IOInterface): method __init__ (line 10) | def __init__(self, json_path: str): method create_file (line 19) | def create_file(self, data: dict) -> bool: method read_file (line 37) | def read_file(self) -> dict | None: method read_file_iterator (line 53) | def read_file_iterator( method read_file_raw (line 94) | def read_file_raw(self) -> TextIOWrapper | None: class GeneratorIO (line 108) | class GeneratorIO: method __init__ (line 117) | def __init__(self, file: TextIOWrapper, item_path: str): method __iter__ (line 128) | def __iter__(self): method __next__ (line 137) | def __next__(self): FILE: tests/unit-tests/src/importmodules/sample_file.py class OpenAIConnector (line 15) | class OpenAIConnector(Connector): method __init__ (line 16) | def __init__(self, ep_arguments: ConnectorEndpointArguments): method get_response (line 28) | async def get_response(self, prompt: str) -> str: method _process_response (line 62) | async def _process_response(self, response: Any) -> str: FILE: tests/unit-tests/src/logger_mock.py class LoggerMock (line 1) | class LoggerMock: method __init__ (line 9) | def __init__(self): method debug (line 21) | def debug(self, msg): method info (line 30) | def info(self, msg): method warning (line 39) | def warning(self, msg): method error (line 48) | def error(self, msg): method critical (line 57) | def critical(self, msg): FILE: tests/unit-tests/src/test-storage.py function init (line 12) | def init(): function mock_get_instance (line 32) | def mock_get_instance(): function test_create_object_with_iterator (line 36) | def test_create_object_with_iterator(mock_get_instance): FILE: tests/unit-tests/src/test_api_bookmark.py class TestCollectionApiBookmark (line 19) | class TestCollectionApiBookmark: method init (line 21) | def init(self): method test_api_insert_bookmark (line 895) | def test_api_insert_bookmark(self, input_args, expected_dict): method test_api_get_all_bookmark (line 915) | def test_api_get_all_bookmark(self): method test_api_get_bookmark (line 961) | def test_api_get_bookmark(self, bookmark_name, expected_result, mocker): method test_api_delete_bookmark (line 995) | def test_api_delete_bookmark(self, bookmark_name, expected_result): method test_api_delete_all_bookmark (line 1004) | def test_api_delete_all_bookmark(self): method test_api_export_bookmarks (line 1026) | def test_api_export_bookmarks(self, export_file_name, expected_output): FILE: tests/unit-tests/src/test_api_connector.py class TestCollectionApiConnector (line 16) | class TestCollectionApiConnector: method init (line 18) | def init(self): method test_api_create_connector_from_endpoint (line 117) | def test_api_create_connector_from_endpoint(self, ep_id, expected_dict): method test_api_create_connectors_from_endpoints (line 282) | def test_api_create_connectors_from_endpoints(self, ep_ids, expected_d... method test_api_get_all_connector_type (line 320) | def test_api_get_all_connector_type(self): FILE: tests/unit-tests/src/test_api_connector_endpoint.py class TestCollectionApiConnectorEndpoint (line 19) | class TestCollectionApiConnectorEndpoint: method init (line 21) | def init(self): method test_api_create_endpoint (line 406) | def test_api_create_endpoint(self, input_args, expected_dict): method test_api_read_endpoint (line 562) | def test_api_read_endpoint(self, ep_id: str, expected_dict: dict): method test_api_update_endpoint (line 769) | def test_api_update_endpoint(self, ep_id: str, ep_dict: dict, expected... method test_api_delete_endpoint (line 876) | def test_api_delete_endpoint(self, ep_id: str, expected_dict: dict): method test_api_get_all_endpoint (line 927) | def test_api_get_all_endpoint(self): method test_api_get_all_endpoint_name (line 983) | def test_api_get_all_endpoint_name(self): FILE: tests/unit-tests/src/test_api_context_strategy.py class TestCollectionApiContextStrategy (line 15) | class TestCollectionApiContextStrategy: method init (line 17) | def init(self): method test_api_get_all_context_strategies (line 46) | def test_api_get_all_context_strategies(self): method test_api_delete_context_strategy (line 132) | def test_api_delete_context_strategy(self, cs_id, expected_dict): method test_api_get_all_context_strategy_metadata (line 174) | def test_api_get_all_context_strategy_metadata(self): FILE: tests/unit-tests/src/test_api_cookbook.py class TestCollectionApiCookbook (line 19) | class TestCollectionApiCookbook: method init (line 21) | def init(self): method test_api_create_cookbook (line 281) | def test_api_create_cookbook(self, input_args, expected_dict): method test_api_read_cookbook (line 410) | def test_api_read_cookbook(self, cookbook_id: str, expected_dict: dict): method test_api_read_cookbooks (line 582) | def test_api_read_cookbooks(self, cookbook_ids: list[str], expected_di... method test_api_update_cookbook (line 758) | def test_api_update_cookbook( method test_api_delete_cookbook (line 867) | def test_api_delete_cookbook(self, cookbook_id: str, expected_dict: di... method test_api_get_all_cookbook (line 910) | def test_api_get_all_cookbook(self): method test_api_get_all_cookbook_name (line 940) | def test_api_get_all_cookbook_name(self): FILE: tests/unit-tests/src/test_api_dataset.py class TestCollectionApiDataset (line 18) | class TestCollectionApiDataset: method init (line 20) | def init(self): method test_api_get_all_datasets (line 53) | def test_api_get_all_datasets(self): method test_api_delete_dataset (line 153) | def test_api_delete_dataset(self, dataset_id, expected_dict): method test_api_convert_dataset (line 221) | def test_api_convert_dataset(self, dataset_details, expected_result): method test_api_download_dataset (line 265) | def test_api_download_dataset(self, dataset_details, expected_result): FILE: tests/unit-tests/src/test_api_metric.py class TestCollectionApiMetric (line 15) | class TestCollectionApiMetric: method init (line 17) | def init(self): method test_api_get_all_metric (line 48) | def test_api_get_all_metric(self): method test_api_delete_metric (line 134) | def test_api_delete_metric(self, metric_id, expected_dict): method test_api_get_all_metric_name (line 182) | def test_api_get_all_metric_name(self): FILE: tests/unit-tests/src/test_api_prompt_template.py class TestCollectionApiPromptTemplate (line 15) | class TestCollectionApiPromptTemplate: method init (line 17) | def init(self): method test_api_get_all_prompt_template_name (line 45) | def test_api_get_all_prompt_template_name(self): method test_api_delete_prompt_template (line 131) | def test_api_delete_prompt_template(self, template_id, expected_result): method test_api_get_all_prompt_template_detail (line 166) | def test_api_get_all_prompt_template_detail(self): FILE: tests/unit-tests/src/test_api_recipe.py class TestCollectionApiRecipe (line 19) | class TestCollectionApiRecipe: method init (line 21) | def init(self): method test_api_create_recipe (line 754) | def test_api_create_recipe(self, input_args, expected_dict): method test_api_read_recipe (line 918) | def test_api_read_recipe(self, recipe_id: str, expected_dict: dict): method test_api_read_recipes (line 1106) | def test_api_read_recipes(self, recipe_ids: list[str], expected_dict: ... method test_api_update_recipe (line 1282) | def test_api_update_recipe( method test_api_delete_recipe (line 1391) | def test_api_delete_recipe(self, recipe_id: str, expected_dict: dict): method test_api_get_all_recipe (line 1434) | def test_api_get_all_recipe(self): method test_api_get_all_recipe_name (line 1482) | def test_api_get_all_recipe_name(self): FILE: tests/unit-tests/src/test_api_red_teaming.py class TestCollectionApiAttackModule (line 15) | class TestCollectionApiAttackModule: method init (line 17) | def init(self): method test_api_get_all_attack_modules (line 47) | def test_api_get_all_attack_modules(self): method test_api_delete_attack_module (line 133) | def test_api_delete_attack_module(self, am_id, expected_dict): method test_api_get_all_attack_module_metadata (line 175) | def test_api_get_all_attack_module_metadata(self): FILE: tests/unit-tests/src/test_api_result.py class TestCollectionApiResult (line 17) | class TestCollectionApiResult: method init (line 19) | def init(self): method test_api_read_result (line 218) | def test_api_read_result(self, result_id: str, expected_dict: dict): method test_api_read_results (line 490) | def test_api_read_results(self, result_ids: list[str], expected_dict: ... method test_api_delete_result (line 594) | def test_api_delete_result(self, result_id: str, expected_dict: dict): method test_api_get_all_result (line 637) | def test_api_get_all_result(self): method test_api_get_all_result_name (line 762) | def test_api_get_all_result_name(self): FILE: tests/unit-tests/src/test_api_run.py class TestCollectionApiRun (line 11) | class TestCollectionApiRun: method init (line 13) | def init(self): method test_api_get_all_run (line 51) | def test_api_get_all_run(self): method test_api_get_all_run_with_id (line 230) | def test_api_get_all_run_with_id(self, runner_id, expected_dict): method test_api_get_all_run_no_db (line 251) | def test_api_get_all_run_no_db(self): FILE: tests/unit-tests/src/test_api_runner.py class TestCollectionApiRunner (line 19) | class TestCollectionApiRunner: method init (line 21) | def init(self): method test_api_create_runner (line 310) | def test_api_create_runner(self, input_args, expected_dict): method test_load_runner (line 515) | def test_load_runner(self, runner_id, progress_callback_func, expected... method test_api_read_runner (line 620) | def test_api_read_runner(self, runner_id: str, expected_dict: dict): method test_api_delete_runner (line 727) | def test_api_delete_runner(self, runner_id: str, expected_dict: dict): method test_api_get_all_runner (line 770) | def test_api_get_all_runner(self): method test_api_get_all_runner_name (line 800) | def test_api_get_all_runner_name(self): FILE: tests/unit-tests/src/test_api_session.py class TestCollectionApiSession (line 27) | class TestCollectionApiSession: method init (line 29) | def init(self): method test_api_create_session (line 375) | def test_api_create_session(self, input_args, expected_dict): method test_load_session (line 519) | def test_load_session(self, runner_id, expected_dict): method test_api_get_all_session_names (line 549) | def test_api_get_all_session_names(self): method test_api_get_all_session_info (line 569) | def test_api_get_all_session_info(self): method test_api_get_all_session_metadata (line 607) | def test_api_get_all_session_metadata(self): method test_api_update_context_strategy (line 745) | def test_api_update_context_strategy( method test_api_update_cs_num_of_prev_prompts (line 893) | def test_api_update_cs_num_of_prev_prompts( method test_api_update_prompt_template (line 1041) | def test_api_update_prompt_template( method test_api_update_metric (line 1189) | def test_api_update_metric( method test_api_update_system_prompt (line 1337) | def test_api_update_system_prompt( method test_api_update_attack_module (line 1485) | def test_api_update_attack_module( method test_api_delete_session (line 1594) | def test_api_delete_session(self, session_id, expected_dict): method test_api_get_all_chats_from_session (line 1700) | def test_api_get_all_chats_from_session(self, session_id, expected_dict): FILE: tests/unit-tests/src/test_bookmark.py class TestCollectionBookmark (line 10) | class TestCollectionBookmark: method test_add_bookmark (line 59) | def test_add_bookmark( method test_get_all_bookmarks (line 176) | def test_get_all_bookmarks( method test_get_bookmark (line 384) | def test_get_bookmark( method test_delete_bookmark (line 499) | def test_delete_bookmark( method test_delete_all_bookmark (line 567) | def test_delete_all_bookmark( method test_export_bookmarks (line 699) | def test_export_bookmarks( method test_export_bookmarks_invalid_filename (line 780) | def test_export_bookmarks_invalid_filename( method test_export_bookmarks_exception (line 821) | def test_export_bookmarks_exception( method test_close (line 858) | def test_close(self, mock_close_database_connection): method test_close_no_db_instance (line 876) | def test_close_no_db_instance(self, mock_close_database_connection): method test_close_multiple_times (line 893) | def test_close_multiple_times(self, mock_close_database_connection): method test_bookmark_singleton (line 916) | def test_bookmark_singleton(self): FILE: tests/unit-tests/src/test_bookmark_arguments.py class TestCollectionBookmarkArguments (line 7) | class TestCollectionBookmarkArguments: method test_create_bookmark_arguments (line 8) | def test_create_bookmark_arguments(self): method test_create_bookmark_arguments_invalid (line 40) | def test_create_bookmark_arguments_invalid( method test_from_tuple_to_dict (line 56) | def test_from_tuple_to_dict(self): method test_from_tuple_to_dict_insufficient_values (line 86) | def test_from_tuple_to_dict_insufficient_values(self): FILE: tests/unit-tests/src/test_connector.py function connector (line 36) | def connector(): function generated_prompt (line 53) | def generated_prompt(): class MockConnector (line 57) | class MockConnector: method __init__ (line 58) | def __init__(self, max_attempts=3): method mock_func_perm_failure (line 66) | async def mock_func_perm_failure(self, *args, **kwargs): method mock_func (line 71) | async def mock_func(self, *args, **kwargs): class TestConnector (line 95) | class TestConnector(Connector): method __init__ (line 96) | def __init__(self, ep_args, rate_limiter, tokens): method get_response (line 103) | async def get_response(self, prompt: str): class TestCollectionConnector (line 108) | class TestCollectionConnector: method test_perform_retry_callback (line 140) | def test_perform_retry_callback( method test_perform_retry (line 191) | async def test_perform_retry(self, max_attempts, expected_attempts, sh... method test_perform_retry_exceeds_retries (line 229) | async def test_perform_retry_exceeds_retries(self, max_attempts): method test_rate_limited (line 262) | async def test_rate_limited( method test_rate_limited_concurrent (line 323) | async def test_rate_limited_concurrent( method test_load_success (line 400) | def test_load_success(self, ep_args, filepath_return_val, connector_re... method test_load_error (line 560) | def test_load_error( method test_create_success (line 620) | def test_create_success(self, ep_args, load_return_val): method test_create_error (line 672) | def test_create_error( method test_create_load_exception (line 689) | def test_create_load_exception(self, mocker): method test_get_available_items (line 729) | def test_get_available_items(self, mock_get_objects, mocked_files, exp... method test_get_available_items_exception (line 750) | def test_get_available_items_exception( method test_get_prediction (line 961) | async def test_get_prediction( method test_get_prediction_exception (line 1075) | async def test_get_prediction_exception( method test_set_system_prompt_success (line 1123) | def test_set_system_prompt_success(self, system_prompt): method test_set_system_prompt_error (line 1155) | def test_set_system_prompt_error( FILE: tests/unit-tests/src/test_connector_endpoint.py class TestCollectionConnectorEndpoint (line 25) | class TestCollectionConnectorEndpoint: method test_create_success (line 77) | def test_create_success(self, mock_create_object, ep_args, expected_ep... method test_create_invalid_values (line 147) | def test_create_invalid_values( method test_create_failure (line 175) | def test_create_failure( method test_read_success (line 222) | def test_read_success( method test_read_invalid_values (line 250) | def test_read_invalid_values( method test_read_endpoint_returns_none (line 274) | def test_read_endpoint_returns_none( method test_read_endpoint_throws_exception (line 303) | def test_read_endpoint_throws_exception( method test_update_success (line 355) | def test_update_success(self, mock_create_object, ep_args, expected_re... method test_update_exception (line 399) | def test_update_exception( method test_update_invalid_arguments (line 450) | def test_update_invalid_arguments( method test_delete_success (line 467) | def test_delete_success(self, mock_delete_object, ep_id, expected_resu... method test_delete_invalid_arguments (line 487) | def test_delete_invalid_arguments(self, invalid_ep_id, expected_result): method test_delete_exception (line 499) | def test_delete_exception(self, mock_delete_object, ep_id, mocked_exce... method test_get_available_items (line 568) | def test_get_available_items( method test_get_available_items_exception (line 602) | def test_get_available_items_exception( FILE: tests/unit-tests/src/test_connector_endpoint_arguments.py class TestCollectionConnectorEndpointArguments (line 9) | class TestCollectionConnectorEndpointArguments: method test_create_connector_endpoint_arguments (line 102) | def test_create_connector_endpoint_arguments( method test_create_connector_endpoint_arguments_1 (line 166) | def test_create_connector_endpoint_arguments_1( method test_create_connector_endpoint_arguments_invalid (line 893) | def test_create_connector_endpoint_arguments_invalid( method test_to_dict (line 965) | def test_to_dict( FILE: tests/unit-tests/src/test_connector_prompt_arguments.py class TestCollectionConnectorPromptArguments (line 8) | class TestCollectionConnectorPromptArguments: method test_create_connector_prompt_arguments (line 27) | def test_create_connector_prompt_arguments( method test_create_connector_prompt_arguments_1 (line 51) | def test_create_connector_prompt_arguments_1(self, prompt_index, promp... method test_create_connector_prompt_arguments_invalid (line 78) | def test_create_connector_prompt_arguments_invalid( method test_create_connector_prompt_arguments_invalid_1 (line 101) | def test_create_connector_prompt_arguments_invalid_1( FILE: tests/unit-tests/src/test_connector_response.py class TestCollectionConnectorResponse (line 7) | class TestCollectionConnectorResponse: method test_create_connector_response (line 19) | def test_create_connector_response(self, response, context): method test_create_connector_response_1 (line 31) | def test_create_connector_response_1(self, response): method test_create_connector_response_invalid (line 51) | def test_create_connector_response_invalid(self, response, context): method test_to_dict (line 66) | def test_to_dict(self, response, context): method test_to_dict_1 (line 79) | def test_to_dict_1(self, response): FILE: tests/unit-tests/src/test_import_modules.py class TestCollectionImportModules (line 15) | class TestCollectionImportModules: method test_create_module_spec (line 48) | def test_create_module_spec(self, module_name, module_file_path, expec... method test_import_module_from_spec (line 67) | def test_import_module_from_spec(self): method test_import_module_from_spec_errors (line 87) | def test_import_module_from_spec_errors(self, module_spec, expected_re... method test_get_instance (line 120) | def test_get_instance(self, id, filepath, expected_result): FILE: tests/unit-tests/src/test_log.py class TestCollectionLog (line 8) | class TestCollectionLog: method test_configure_logger (line 24) | def test_configure_logger(self, log_name, expected_log_name): method test_configure_logger_log_level (line 48) | def test_configure_logger_log_level(self, mocker, environ_value, expec... method test_configure_logger_log_to_file (line 67) | def test_configure_logger_log_to_file(self, mocker, environ_value, exp... method test_configure_logger_log_name (line 100) | def test_configure_logger_log_name(self, mocker, environ_value, expect... FILE: tests/unit-tests/src/test_timeit.py class TestCollectionTimeitMethod (line 6) | class TestCollectionTimeitMethod: method test_time_class_method (line 7) | def test_time_class_method(self, mocker): FILE: tests/unit-tests/web_api/test_routes/conftest.py function mock_bm_test_state (line 22) | def mock_bm_test_state(): function mock_cs_service (line 26) | def mock_cs_service(): function mock_am_service (line 30) | def mock_am_service(): function mock_bm_service (line 34) | def mock_bm_service(): function mock_dataset_service (line 38) | def mock_dataset_service(): function mock_endpoint_service (line 42) | def mock_endpoint_service(): function mock_bm_result_service (line 46) | def mock_bm_result_service(): function mock_runner_service (line 50) | def mock_runner_service(): function mock_pt_service (line 54) | def mock_pt_service(): function mock_cookbook_service (line 58) | def mock_cookbook_service(): function mock_recipe_service (line 62) | def mock_recipe_service(): function mock_metric_service (line 66) | def mock_metric_service(): function mock_session_service (line 70) | def mock_session_service(): function mock_bookmark_service (line 74) | def mock_bookmark_service(): function test_client (line 78) | def test_client( FILE: tests/unit-tests/web_api/test_routes/test_routes_attack_modules.py function test_get_all_attack_module (line 12) | def test_get_all_attack_module(test_client, mock_am_service, attack_modu... function test_get_all_attack_module_metadata (line 33) | def test_get_all_attack_module_metadata(test_client, mock_am_service, ex... FILE: tests/unit-tests/web_api/test_routes/test_routes_benchmarks.py function test_execute_benchmark_cb (line 104) | def test_execute_benchmark_cb(test_client, mock_bm_service, benchmark_da... function test_get_benchmark_progress (line 133) | def test_get_benchmark_progress(test_client, mock_bm_test_state, excepti... function test_cancel_benchmark (line 148) | def test_cancel_benchmark(test_client, mock_bm_service, runner_id, excep... FILE: tests/unit-tests/web_api/test_routes/test_routes_bm_results.py function test_get_all_benchmark_results (line 13) | def test_get_all_benchmark_results(test_client, mock_bm_result_service, ... function test_get_all_results_name (line 32) | def test_get_all_results_name(test_client, mock_bm_result_service, mock_... function test_get_one_benchmark_results (line 56) | def test_get_one_benchmark_results(test_client, mock_bm_result_service, ... function test_delete_result (line 75) | def test_delete_result(test_client, mock_bm_result_service, result_id, e... FILE: tests/unit-tests/web_api/test_routes/test_routes_bookmark.py function test_get_all_bookmarks (line 66) | def test_get_all_bookmarks(test_client, mock_bookmark_service, bookmark_... function test_insert_bookmark (line 140) | def test_insert_bookmark(test_client, mock_bookmark_service, bookmark_da... function test_delete_bookmark (line 213) | def test_delete_bookmark(test_client, mock_bookmark_service, delete_all,... FILE: tests/unit-tests/web_api/test_routes/test_routes_context_strategy.py function test_get_all_context_strategies (line 22) | def test_get_all_context_strategies(test_client, mock_cs_service, contex... function test_get_all_context_strategies_name (line 44) | def test_get_all_context_strategies_name(test_client, mock_cs_service, c... function test_delete_context_strategy (line 66) | def test_delete_context_strategy(test_client, mock_cs_service, strategy_... FILE: tests/unit-tests/web_api/test_routes/test_routes_cookbook.py function test_create_cookbook (line 169) | def test_create_cookbook(test_client, mock_cookbook_service, cookbook_da... function test_get_cookbooks (line 404) | def test_get_cookbooks(test_client, mock_cookbook_service, query_string,... function test_get_all_cookbooks_name (line 443) | def test_get_all_cookbooks_name(test_client, mock_cookbook_service, mock... function test_update_cookbook (line 488) | def test_update_cookbook(test_client, mock_cookbook_service, cookbook_id... function test_delete_cookbook (line 512) | def test_delete_cookbook(test_client, mock_cookbook_service, cb_id, serv... FILE: tests/unit-tests/web_api/test_routes/test_routes_dataset.py function test_get_all_datasets (line 43) | def test_get_all_datasets(test_client, mock_dataset_service, mockdata, e... function test_get_all_dataset_names (line 64) | def test_get_all_dataset_names(test_client, mock_dataset_service, mockda... function test_delete_dataset (line 85) | def test_delete_dataset(test_client, mock_dataset_service, dataset_id, e... function test_download_dataset (line 159) | def test_download_dataset(test_client, mock_dataset_service, dataset_dat... function test_convert_dataset (line 224) | def test_convert_dataset(test_client, mock_dataset_service, file_name, f... FILE: tests/unit-tests/web_api/test_routes/test_routes_endpoint.py function test_create_endpoint (line 84) | def test_create_endpoint( function test_get_all_endpoints (line 194) | def test_get_all_endpoints( function test_get_all_endpoints_name (line 264) | def test_get_all_endpoints_name( function test_get_endpoint (line 347) | def test_get_endpoint( function test_update_endpoint (line 415) | def test_update_endpoint( function test_delete_endpoint (line 472) | def test_delete_endpoint( function test_get_connectors (line 539) | def test_get_connectors( FILE: tests/unit-tests/web_api/test_routes/test_routes_metrics.py function test_get_metrics (line 33) | def test_get_metrics(test_client, mock_metric_service, metrics_data, exc... function test_delete_metric (line 55) | def test_delete_metric(test_client, mock_metric_service, metric_id, exce... FILE: tests/unit-tests/web_api/test_routes/test_routes_prompt_template.py function test_get_all_prompt_templates (line 16) | def test_get_all_prompt_templates(test_client, mock_pt_service, template... function test_get_all_prompt_templates_names (line 39) | def test_get_all_prompt_templates_names(test_client, mock_pt_service, te... function test_delete_prompt_template (line 61) | def test_delete_prompt_template(test_client, mock_pt_service, pt_name, e... FILE: tests/unit-tests/web_api/test_routes/test_routes_recipe.py function test_create_recipe (line 165) | def test_create_recipe(test_client, mock_recipe_service, recipe_data, ex... function test_get_all_recipes (line 578) | def test_get_all_recipes(test_client, mock_recipe_service, query_string,... function test_get_all_recipes_name (line 615) | def test_get_all_recipes_name(test_client, mock_recipe_service ,mock_ret... function test_update_recipe (line 660) | def test_update_recipe(test_client, mock_recipe_service, recipe_id, reci... function test_delete_recipe (line 684) | def test_delete_recipe(test_client, mock_recipe_service, recipe_id, serv... FILE: tests/unit-tests/web_api/test_routes/test_routes_redteam.py function test_get_all_sessions (line 81) | def test_get_all_sessions(test_client, mock_session_service, mock_respon... function test_create_session (line 145) | def test_create_session(test_client, mock_session_service, session_data,... function test_delete_session (line 170) | def test_delete_session(test_client, mock_session_service, session_id, e... function test_send_prompt (line 219) | def test_send_prompt(test_client, mock_session_service, session_id, prom... function test_cancel_redteam (line 243) | def test_cancel_redteam(test_client, mock_session_service, session_id, e... function test_set_prompt_template (line 266) | def test_set_prompt_template(test_client, mock_session_service, runner_i... function test_unset_prompt_template (line 287) | def test_unset_prompt_template(test_client, mock_session_service, runner... function test_set_context_strategy (line 309) | def test_set_context_strategy(test_client, mock_session_service, runner_... function test_unset_context_strategy (line 330) | def test_unset_context_strategy(test_client, mock_session_service, runne... function test_set_attack_module (line 351) | def test_set_attack_module(test_client, mock_session_service, runner_id,... function test_unset_attack_module (line 372) | def test_unset_attack_module(test_client, mock_session_service, runner_i... function test_set_metric (line 393) | def test_set_metric(test_client, mock_session_service, runner_id, metric... function test_unset_metric (line 414) | def test_unset_metric(test_client, mock_session_service, runner_id, metr... function test_set_system_prompt (line 456) | def test_set_system_prompt(test_client, mock_session_service, runner_id,... function test_unset_system_prompt (line 477) | def test_unset_system_prompt(test_client, mock_session_service, runner_i... function test_close_session (line 498) | def test_close_session(test_client, mock_session_service, runner_id, exc... FILE: tests/unit-tests/web_api/test_routes/test_routes_runner.py function test_get_all_runners (line 66) | def test_get_all_runners(test_client, mock_runner_service, runner_data, ... function test_get_all_runner_name (line 88) | def test_get_all_runner_name(test_client, mock_runner_service, runner_da... function test_get_runner_by_id (line 147) | def test_get_runner_by_id(test_client, mock_runner_service, runner_id, r... function test_delete_runner (line 169) | def test_delete_runner(test_client, mock_runner_service, runner_id, exce... function test_get_run_details_by_runner (line 222) | def test_get_run_details_by_runner(test_client, mock_runner_service, run... function test_get_run_ids_in_runner (line 248) | def test_get_run_ids_in_runner(test_client, mock_runner_service ,runner_... FILE: tests/unit-tests/web_api/test_services/test_service_attack_modules.py function attack_module_service (line 22) | def attack_module_service(): function test_get_all_attack_module_success (line 27) | def test_get_all_attack_module_success(mock_moonshot_api, attack_module_... function test_get_all_attack_module_metadata_success (line 37) | def test_get_all_attack_module_metadata_success(mock_moonshot_api, attac... function test_get_all_attack_module_exceptions (line 48) | def test_get_all_attack_module_exceptions(mock_moonshot_api, exception, ... function test_get_all_attack_module_metadata_exceptions (line 60) | def test_get_all_attack_module_metadata_exceptions(mock_moonshot_api, ex... FILE: tests/unit-tests/web_api/test_services/test_service_benchmark_result.py function benchmark_result_service (line 42) | def benchmark_result_service(): function test_get_all_results_success (line 46) | def test_get_all_results_success(mock_moonshot_api, benchmark_result_ser... function test_get_all_result_name_success (line 56) | def test_get_all_result_name_success(mock_moonshot_api, benchmark_result... function test_get_result_by_id_success (line 66) | def test_get_result_by_id_success(mock_moonshot_api, benchmark_result_se... function test_delete_result_success (line 76) | def test_delete_result_success(mock_moonshot_api, benchmark_result_servi... function test_get_all_results_exceptions (line 85) | def test_get_all_results_exceptions(mock_moonshot_api, exception, error_... function test_get_all_result_name_exceptions (line 97) | def test_get_all_result_name_exceptions(mock_moonshot_api, exception, er... function test_get_result_by_id_exceptions (line 109) | def test_get_result_by_id_exceptions(mock_moonshot_api, exception, error... function test_delete_result_exceptions (line 121) | def test_delete_result_exceptions(mock_moonshot_api, exception, error_co... FILE: tests/unit-tests/web_api/test_services/test_service_bookmark.py function bookmark_service (line 55) | def bookmark_service(): function test_get_all_bookmarks_success (line 59) | def test_get_all_bookmarks_success(mock_moonshot_api, bookmark_service): function test_get_all_bookmarks_exceptions (line 70) | def test_get_all_bookmarks_exceptions(mock_moonshot_api, exception, erro... function test_insert_bookmark_success (line 80) | def test_insert_bookmark_success(mock_moonshot_api, bookmark_service): function test_insert_bookmark_exceptions (line 90) | def test_insert_bookmark_exceptions(mock_moonshot_api, exception, error_... function test_delete_bookmark_success (line 100) | def test_delete_bookmark_success(mock_moonshot_api, bookmark_service): function test_delete_all_bookmarks_success (line 109) | def test_delete_all_bookmarks_success(mock_moonshot_api, bookmark_service): function test_delete_bookmarks_no_params (line 118) | def test_delete_bookmarks_no_params(mock_moonshot_api, bookmark_service): function test_delete_bookmarks_exceptions (line 129) | def test_delete_bookmarks_exceptions(mock_moonshot_api, exception, error... FILE: tests/unit-tests/web_api/test_services/test_service_context_strategy.py function context_strategy_service (line 29) | def context_strategy_service(): function test_get_ctx_strategy_success (line 33) | def test_get_ctx_strategy_success(mock_moonshot_api, context_strategy_se... function test_get_ctx_strategy_name_success (line 43) | def test_get_ctx_strategy_name_success(mock_moonshot_api, context_strate... function test_delete_ctx_strategy_success (line 53) | def test_delete_ctx_strategy_success(mock_moonshot_api, context_strategy... function test_get_ctx_strategy_exceptions (line 62) | def test_get_ctx_strategy_exceptions(mock_moonshot_api, exception, error... function test_get_ctx_strategy_name_exceptions (line 74) | def test_get_ctx_strategy_name_exceptions(mock_moonshot_api, exception, ... function test_delete_ctx_strategy_exceptions (line 86) | def test_delete_ctx_strategy_exceptions(mock_moonshot_api, exception, er... FILE: tests/unit-tests/web_api/test_services/test_service_cookbook.py function cookbook_service (line 64) | def cookbook_service(): function test_get_all_cookbooks_success (line 68) | def test_get_all_cookbooks_success(mock_moonshot_api, cookbook_service): function test_get_all_cookbooks_names_success (line 79) | def test_get_all_cookbooks_names_success(mock_moonshot_api, cookbook_ser... function test_get_all_cookbooks_exceptions (line 90) | def test_get_all_cookbooks_exceptions(mock_moonshot_api, exception, erro... function test_get_all_cookbooks_names_exceptions (line 102) | def test_get_all_cookbooks_names_exceptions(mock_moonshot_api, exception... function test_create_cookbook_success (line 113) | def test_create_cookbook_success(mock_moonshot_api, cookbook_service): function test_update_cookbook_success (line 125) | def test_update_cookbook_success(mock_moonshot_api, cookbook_service): function test_delete_cookbook_success (line 140) | def test_delete_cookbook_success(mock_moonshot_api, cookbook_service): function test_create_cookbook_exceptions (line 149) | def test_create_cookbook_exceptions(mock_moonshot_api, exception, error_... function test_update_cookbook_exceptions (line 160) | def test_update_cookbook_exceptions(mock_moonshot_api, exception, error_... function test_delete_cookbook_exceptions (line 171) | def test_delete_cookbook_exceptions(mock_moonshot_api, exception, error_... FILE: tests/unit-tests/web_api/test_services/test_service_dataset.py function dataset_service (line 57) | def dataset_service(): function test_get_all_datasets_success (line 61) | def test_get_all_datasets_success(mock_moonshot_api, dataset_service): function test_get_all_datasets_name_success (line 71) | def test_get_all_datasets_name_success(mock_moonshot_api, dataset_service): function test_delete_dataset_success (line 81) | def test_delete_dataset_success(mock_moonshot_api, dataset_service): function test_get_all_datasets_exceptions (line 90) | def test_get_all_datasets_exceptions(mock_moonshot_api, exception, error... function test_get_all_datasets_name_exceptions (line 102) | def test_get_all_datasets_name_exceptions(mock_moonshot_api, exception, ... function test_delete_dataset_exceptions (line 114) | def test_delete_dataset_exceptions(mock_moonshot_api, exception, error_c... function test_download_dataset_success (line 126) | def test_download_dataset_success(mock_copy_file, mock_moonshot_api): function test_convert_dataset_success (line 152) | def test_convert_dataset_success(mock_copy_file, mock_moonshot_api): FILE: tests/unit-tests/web_api/test_services/test_service_endpoint.py function endpoint_service (line 56) | def endpoint_service(): function test_get_all_endpoints_success (line 61) | def test_get_all_endpoints_success(mock_moonshot_api, endpoint_service): function test_get_all_endpoints_names_success (line 75) | def test_get_all_endpoints_names_success(mock_moonshot_api, endpoint_ser... function test_get_all_connectors_success (line 86) | def test_get_all_connectors_success(mock_moonshot_api, endpoint_service): function test_get_all_endpoints_exceptions (line 106) | def test_get_all_endpoints_exceptions( function test_get_all_endpoints_names_exceptions (line 120) | def test_get_all_endpoints_names_exceptions( function test_get_all_connectors_exceptions (line 134) | def test_get_all_connectors_exceptions( function test_create_endpoint_success (line 147) | def test_create_endpoint_success(mock_moonshot_api, endpoint_service): function test_update_endpoint_success (line 165) | def test_update_endpoint_success(mock_moonshot_api, endpoint_service): function test_delete_endpoint_success (line 176) | def test_delete_endpoint_success(mock_moonshot_api, endpoint_service): function test_create_endpoint_exception (line 186) | def test_create_endpoint_exception( function test_update_endpoint_exception (line 200) | def test_update_endpoint_exception( function test_delete_endpoint_exception (line 214) | def test_delete_endpoint_exception( FILE: tests/unit-tests/web_api/test_services/test_service_metric.py function metric_service (line 28) | def metric_service(): function test_get_all_metric_success (line 32) | def test_get_all_metric_success(mock_moonshot_api, metric_service): function test_delete_metric_success (line 42) | def test_delete_metric_success(mock_moonshot_api, metric_service): function test_get_all_metric_exceptions (line 51) | def test_get_all_metric_exceptions(mock_moonshot_api, exception, error_c... function test_delete_metric_exceptions (line 63) | def test_delete_metric_exceptions(mock_moonshot_api, exception, error_co... FILE: tests/unit-tests/web_api/test_services/test_service_prompt_template.py function prompt_template_service (line 29) | def prompt_template_service(): function test_get_prompt_templates_success (line 33) | def test_get_prompt_templates_success(mock_moonshot_api, prompt_template... function test_get_prompt_templates_name_success (line 43) | def test_get_prompt_templates_name_success(mock_moonshot_api, prompt_tem... function test_delete_prompt_template_success (line 53) | def test_delete_prompt_template_success(mock_moonshot_api, prompt_templa... function test_get_prompt_templates_exceptions (line 62) | def test_get_prompt_templates_exceptions(mock_moonshot_api, exception, e... function test_get_prompt_templates_name_exceptions (line 74) | def test_get_prompt_templates_name_exceptions(mock_moonshot_api, excepti... function test_delete_prompt_template_exceptions (line 86) | def test_delete_prompt_template_exceptions(mock_moonshot_api, exception,... FILE: tests/unit-tests/web_api/test_services/test_service_recipe.py function recipe_service (line 60) | def recipe_service(): function test_get_all_recipes_success (line 64) | def test_get_all_recipes_success(mock_moonshot_api, recipe_service): function test_get_all_recipes_name_success (line 75) | def test_get_all_recipes_name_success(mock_moonshot_api, recipe_service): function test_get_all_recipes_exceptions (line 86) | def test_get_all_recipes_exceptions(mock_moonshot_api, exception, error_... function test_get_all_recipes_name_exceptions (line 97) | def test_get_all_recipes_name_exceptions(mock_moonshot_api, exception, e... function test_create_recipe_success (line 107) | def test_create_recipe_success(mock_moonshot_api, recipe_service): function test_update_recipe_success (line 124) | def test_update_recipe_success(mock_moonshot_api, recipe_service): function test_delete_recipe_success (line 135) | def test_delete_recipe_success(mock_moonshot_api, recipe_service): function test_create_recipe_exceptions (line 144) | def test_create_recipe_exceptions(mock_moonshot_api, exception, error_co... function test_update_recipe_exceptions (line 155) | def test_update_recipe_exceptions(mock_moonshot_api, exception, error_co... function test_delete_recipe_exceptions (line 166) | def test_delete_recipe_exceptions(mock_moonshot_api, exception, error_co... FILE: tests/unit-tests/web_api/test_services/test_service_runner.py function runner_service (line 58) | def runner_service(): function test_get_all_runner_success (line 62) | def test_get_all_runner_success(mock_moonshot_api, runner_service): function test_get_all_runner_name_success (line 72) | def test_get_all_runner_name_success(mock_moonshot_api, runner_service): function test_get_runner_by_id_success (line 82) | def test_get_runner_by_id_success(mock_moonshot_api, runner_service): function test_delete_run_success (line 92) | def test_delete_run_success(mock_moonshot_api, runner_service): function test_get_all_runner_exceptions (line 101) | def test_get_all_runner_exceptions(mock_moonshot_api, exception, error_c... function test_get_all_runner_name_exceptions (line 113) | def test_get_all_runner_name_exceptions(mock_moonshot_api, exception, er... function test_get_runner_by_id_exceptions (line 125) | def test_get_runner_by_id_exceptions(mock_moonshot_api, exception, error... function test_delete_run_exceptions (line 137) | def test_delete_run_exceptions(mock_moonshot_api, exception, error_code,... FILE: tests/unit-tests/web_api/test_services/test_service_session.py function session_service (line 50) | def session_service(): function test_get_all_session_success (line 53) | def test_get_all_session_success(mock_moonshot_api, session_service): function test_get_all_sessions_names_success (line 63) | def test_get_all_sessions_names_success(mock_moonshot_api, session_servi... function test_get_all_session_exception (line 74) | def test_get_all_session_exception(mock_moonshot_api, session_service, e... function test_get_all_sessions_names_exception (line 85) | def test_get_all_sessions_names_exception(mock_moonshot_api, session_ser... function test_delete_session_success (line 95) | def test_delete_session_success(mock_moonshot_api, session_service): function test_delete_session_exception (line 105) | def test_delete_session_exception(mock_moonshot_api, session_service, ex... function test_select_prompt_template_success (line 116) | def test_select_prompt_template_success(mock_moonshot_api, session_servi... function test_select_context_strategy_success (line 128) | def test_select_context_strategy_success(mock_moonshot_api, session_serv... function test_select_attack_module_success (line 140) | def test_select_attack_module_success(mock_moonshot_api, session_service): function test_select_metric_success (line 152) | def test_select_metric_success(mock_moonshot_api, session_service): function test_update_system_prompt_success (line 164) | def test_update_system_prompt_success(mock_moonshot_api, session_service): function test_cancel_auto_redteam_success (line 176) | async def test_cancel_auto_redteam_success(session_service): function test_end_session_success (line 186) | async def test_end_session_success(session_service):