pyrit.setup.initializers.SimpleInitializer#

class SimpleInitializer[source]#

Bases: PyRITInitializer

Complete simple configuration initializer.

This initializer provides a unified setup for basic PyRIT usage including: - Converter targets with basic OpenAI configuration - Simple objective scorer (no harm detection) - Adversarial target configurations for attacks

Required Environment Variables: - OPENAI_CHAT_ENDPOINT and OPENAI_CHAT_KEY

This configuration is designed for simple use cases with: - Basic OpenAI API integration (uses standard OPENAI_API_KEY env var) - Simplified scoring without harm detection or content filtering - Minimal configuration requirements

Example

initializer = SimpleInitializer() initializer.initialize() # Sets up complete simple configuration

__init__() None[source]#

Initialize the simple unified initializer.

Methods

__init__()

Initialize the simple unified initializer.

get_dynamic_default_values_info()

Get information about what default values and global variables this initializer sets.

get_info()

Get information about this initializer class.

initialize()

Execute the complete simple initialization.

initialize_with_tracking()

Execute initialization while tracking what changes are made.

validate()

Validate the initializer configuration before execution.

Attributes

description

Get the description of this initializer.

execution_order

Get the execution order for this initializer.

name

Get the name of this initializer.

required_env_vars

Get list of required environment variables.

property description: str#

Get the description of this initializer.

initialize() None[source]#

Execute the complete simple initialization.

Sets up: 1. Converter targets with basic OpenAI configuration 2. Simple objective scorer (no harm detection) 3. Adversarial target configurations 4. Default values for attack types

property name: str#

Get the name of this initializer.

property required_env_vars: List[str]#

Get list of required environment variables.