Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

API Reference

pyrit.analytics

ApproximateTextMatching, AttackStats, ConversationAnalytics, ExactTextMatching, TextMatching, analyze_results(), get_cached_results_for_technique()

pyrit.auth

AsyncTokenProviderCredential, Authenticator, AzureAuth, AzureStorageAuth, CopilotAuthenticator, ManualCopilotAuthenticator, TokenProviderCredential, ensure_async_token_provider() ... (14 total)

pyrit.auxiliary_attacks

ExperimentalWarning

pyrit.cli.api_client

PyRITApiClient, RegisteredInitializer, RegisteredScenario, RunScenarioRequest, ScenarioResult, ScenarioRunSummary, ServerNotAvailableError, TargetInstance

pyrit.cli.pyrit_scan

Parameter, RegisteredScenario, RunScenarioRequest, ScenarioRunSummary, build_parameters_from_api(), collapse_dataset_filters(), main(), parse_args() ... (10 total)

pyrit.cli.pyrit_shell

PyRITShell, main()

pyrit.common

DefaultValueScope, Singleton, YamlLoadable, apply_defaults_to_method(), combine_dict(), combine_list(), enforce_keyword_only_init(), get_global_default_values() ... (18 total)

pyrit.converter

AddImageTextConverter, AddImageVideoConverter, AddTextImageConverter, AllWordsSelectionStrategy, AnsiAttackConverter, ArabicPresentationFormConverter, ArabiziConverter, AsciiArtConverter ... (103 total)

pyrit.datasets

SeedDatasetFilter, SeedDatasetLoadTime, SeedDatasetMetadata, SeedDatasetProvider, TextJailBreak

pyrit.embedding

OpenAITextEmbedding

pyrit.exceptions

BadRequestException, ComponentRole, EmptyResponseException, ExecutionContext, ExecutionContextManager, ExperimentalWarning, InvalidJsonException, MissingPromptPlaceholderException ... (26 total)

pyrit.executor.attack

AttackAdversarialConfig, AttackContext, AttackConverterConfig, AttackExecutor, AttackExecutorResult, AttackParameters, AttackScoringConfig, AttackStrategy ... (42 total)

pyrit.executor.benchmark

FairnessBiasBenchmark, FairnessBiasBenchmarkContext, QuestionAnsweringBenchmark, QuestionAnsweringBenchmarkContext

pyrit.executor.core

Strategy, StrategyContext, StrategyConverterConfig, StrategyEvent, StrategyEventData, StrategyEventHandler

pyrit.executor.promptgen

AnecdoctorContext, AnecdoctorGenerator, AnecdoctorResult, PromptGeneratorStrategy, PromptGeneratorStrategyContext, PromptGeneratorStrategyResult

pyrit.executor.workflow

XPIAContext, XPIAManualProcessingWorkflow, XPIAProcessingCallback, XPIAResult, XPIAStatus, XPIATestWorkflow, XPIAWorkflow

pyrit.memory

AttackResultEntry, AudioPathDataTypeSerializer, AzureBlobStorageIO, AzureSQLMemory, BinaryPathDataTypeSerializer, CentralMemory, DataTypeSerializer, DiskStorageIO ... (24 total)

pyrit.message_normalizer

ChatMessageNormalizer, ConversationContextNormalizer, GenericSystemSquashNormalizer, HistorySquashNormalizer, JsonSchemaNormalizer, MessageListNormalizer, MessageStringNormalizer, TokenizerTemplateNormalizer

pyrit.models

AtomicAttackEvaluationIdentifier, AtomicAttackIdentifier, AttackIdentifier, AttackOutcome, AttackResult, AttackSeedGroup, AttackTechniqueIdentifier, AttackTechniqueSeedGroup ... (79 total)

pyrit.output

FileSink, IPythonMarkdownSink, PrinterBase, Sink, StdoutSink, get_default_sink(), output_attack_async(), output_conversation_async() ... (11 total)

pyrit.prompt_normalizer

ConverterConfiguration, NormalizerRequest, PromptNormalizer

pyrit.prompt_target

AzureBlobStorageTarget, AzureMLChatTarget, CHAT_TARGET_REQUIREMENTS, CapabilityHandlingPolicy, CapabilityName, ConversationNormalizationPipeline, CopilotType, GandalfLevel ... (38 total)

pyrit.registry

AttackTechniqueMetadata, AttackTechniqueRegistry, ConverterMetadata, ConverterRegistry, DefaultInstanceRegistry, InitializerMetadata, InitializerRegistry, InstanceRegistry ... (21 total)

pyrit.scenario

AtomicAttack, AttackTechnique, AttackTechniqueFactory, BaselineAttackPolicy, CompoundDatasetAttackConfiguration, DatasetAttackConfiguration, DatasetConfiguration, DatasetSourceKind ... (14 total)

pyrit.score

AnthraxKeywordScorer, AudioFloatScaleScorer, AudioTrueFalseScorer, AzureContentFilterScorer, BatchScorer, CallableResponseHandler, ContentClassifier, ContentClassifierCategory ... (92 total)

pyrit.setup

ConfigurationLoader, initialize_from_config_async(), initialize_pyrit_async()

pyrit.show_versions

show_versions()