This PR is to add optional parameters for users to use in their attack modules. The optional parameters will be entered by the user in the CLI in the form of a dictionary, which the attack modules can take in (i.e. users may want to decide how many iterations the attack module should run before stopping, so the dictionary can have a field like "max_no_of_iteration" which the attack module will read in)
How to test:
Start cli: python -m moonshot cli interactive
Create a new session: new_session -h and copy the help sample codes to create a new session with a new runner (change the connector endpoint to one you can access with your API key)
Inside the session, enter run_attack_module sample_attack_module "test prompt" -o "{'max_number_of_iteration': 1, 'my_optional_param': 'hello world'}"
This PR is to add optional parameters for users to use in their attack modules. The optional parameters will be entered by the user in the CLI in the form of a dictionary, which the attack modules can take in (i.e. users may want to decide how many iterations the attack module should run before stopping, so the dictionary can have a field like "max_no_of_iteration" which the attack module will read in)
How to test:
python -m moonshot cli interactive
new_session -h
and copy the help sample codes to create a new session with a new runner (change the connector endpoint to one you can access with your API key)run_attack_module sample_attack_module "test prompt" -o "{'max_number_of_iteration': 1, 'my_optional_param': 'hello world'}"