SYMBOL INDEX (2018 symbols across 315 files) FILE: docs/source/_ext/garak_ext.py class ShowASRDirective (line 12) | class ShowASRDirective(SphinxDirective): method run (line 15) | def run(self) -> list: method _parse_rst (line 39) | def _parse_rst(self, text): function setup (line 52) | def setup(app: object) -> dict: FILE: garak-report/src/App.tsx function App (line 21) | function App() { FILE: garak-report/src/components/DefconBadge.tsx type DefconBadgeProps (line 14) | interface DefconBadgeProps { FILE: garak-report/src/components/DefconSummaryPanel.tsx type DefconSummaryPanelProps (line 17) | interface DefconSummaryPanelProps { FILE: garak-report/src/components/DetectorChart/DetectorFilters.tsx type DetectorFiltersProps (line 16) | interface DetectorFiltersProps { FILE: garak-report/src/components/DetectorChart/DetectorLollipopChart.tsx type DetectorLollipopChartProps (line 19) | interface DetectorLollipopChartProps { FILE: garak-report/src/components/DetectorChart/DetectorResultsTable.tsx type DetectorResultsTableProps (line 17) | interface DetectorResultsTableProps { FILE: garak-report/src/components/ErrorBoundary.tsx type Props (line 15) | interface Props { type State (line 21) | interface State { class ErrorBoundary (line 39) | class ErrorBoundary extends Component { method getDerivedStateFromError (line 45) | public static getDerivedStateFromError(error: Error): State { method componentDidCatch (line 50) | public componentDidCatch(error: Error, errorInfo: ErrorInfo) { method render (line 60) | public render() { FILE: garak-report/src/components/GarakLogo.tsx type GarakLogoProps (line 15) | interface GarakLogoProps { function GarakLogo (line 29) | function GarakLogo({ FILE: garak-report/src/components/Header.tsx type HeaderProps (line 15) | interface HeaderProps { FILE: garak-report/src/components/MetadataSection.tsx type MetadataSectionProps (line 16) | type MetadataSectionProps = { FILE: garak-report/src/components/ModuleAccordion.tsx type ModuleAccordionProps (line 19) | interface ModuleAccordionProps { FILE: garak-report/src/components/NvidiaLogo.tsx type NvidiaLogoProps (line 4) | interface NvidiaLogoProps { function NvidiaLogo (line 10) | function NvidiaLogo({ FILE: garak-report/src/components/ProbeChart/ModuleFilterChips.tsx type KUIBadgeColor (line 15) | type KUIBadgeColor = "blue" | "green" | "red" | "yellow" | "purple" | "t... constant MODULE_COLORS (line 18) | const MODULE_COLORS: KUIBadgeColor[] = ["blue", "green", "purple", "teal... constant DOT_COLOR_VARS (line 21) | const DOT_COLOR_VARS: Record = { function getModuleColor (line 35) | function getModuleColor(index: number): KUIBadgeColor { type ModuleFilterChipsProps (line 39) | interface ModuleFilterChipsProps { FILE: garak-report/src/components/ProbeChart/ProbeBarChart.tsx type ProbeBarChartProps (line 17) | interface ProbeBarChartProps { FILE: garak-report/src/components/ProbeChart/ProbeTagsList.tsx type ProbeTagsListProps (line 14) | interface ProbeTagsListProps { FILE: garak-report/src/components/ProgressBar.tsx type ProgressBarProps (line 11) | interface ProgressBarProps { FILE: garak-report/src/components/ReportFilterBar.tsx function isSortOption (line 20) | function isSortOption(value: string): value is SortOption { type ReportFilterBarProps (line 25) | interface ReportFilterBarProps { FILE: garak-report/src/components/SetupSection.tsx type GroupedSections (line 16) | type GroupedSections = Record>; FILE: garak-report/src/components/SummaryStatsCard.tsx type SummaryStatsCardProps (line 17) | interface SummaryStatsCardProps { FILE: garak-report/src/components/__tests__/ProbesChart.test.tsx type MockDetectorsViewProps (line 69) | interface MockDetectorsViewProps { type TooltipData (line 93) | interface TooltipData { FILE: garak-report/src/components/__tests__/ProbesChart.tooltip.test.tsx type CapturedOption (line 73) | interface CapturedOption { FILE: garak-report/src/constants/chart.ts constant CHART_DIMENSIONS (line 12) | const CHART_DIMENSIONS = { constant CHART_LABEL_CONFIG (line 48) | const CHART_LABEL_CONFIG = { constant CHART_SYMBOL_SIZES (line 55) | const CHART_SYMBOL_SIZES = { constant CHART_LINE_WIDTHS (line 61) | const CHART_LINE_WIDTHS = { constant CHART_BORDER_WIDTHS (line 67) | const CHART_BORDER_WIDTHS = { constant CHART_SHADOW (line 73) | const CHART_SHADOW = { constant CHART_OPACITY (line 81) | const CHART_OPACITY = { FILE: garak-report/src/constants/defcon.ts constant DEFCON_LEVELS (line 12) | const DEFCON_LEVELS = [1, 2, 3, 4, 5] as const; constant DEFCON_LABELS (line 15) | const DEFCON_LABELS = { constant DEFCON_RISK_COMMENTS (line 28) | const DEFCON_RISK_COMMENTS = { type DefconLevel (line 45) | type DefconLevel = (typeof DEFCON_LEVELS)[number]; FILE: garak-report/src/constants/theme.ts constant THEME_COLORS (line 12) | const THEME_COLORS = { constant CSS_COLOR_VARS (line 29) | const CSS_COLOR_VARS = { constant DEFCON_BADGE_COLORS (line 48) | const DEFCON_BADGE_COLORS = { type BadgeColor (line 58) | type BadgeColor = "blue" | "gray" | "green" | "purple" | "red" | "teal" ... FILE: garak-report/src/hooks/useDetectorChartOptions.ts type DetectorChartOptionsResult (line 23) | interface DetectorChartOptionsResult { type ChartDetectorData (line 33) | interface ChartDetectorData { function useDetectorChartOptions (line 53) | function useDetectorChartOptions( FILE: garak-report/src/hooks/useDetectorsChartSeries.ts function useDetectorsChartSeries (line 33) | function useDetectorsChartSeries() { FILE: garak-report/src/hooks/useFlattenedModules.ts function isSetupConfig (line 30) | function isSetupConfig(setup: unknown): setup is Record { function buildDetector (line 40) | function buildDetector(name: string, data: EvalDetectorData): Detector |... function useFlattenedModules (line 78) | function useFlattenedModules(report: ReportEntry | null): ModuleData[] { FILE: garak-report/src/hooks/useModuleFilters.ts type SortOption (line 15) | type SortOption = "defcon" | "alphabetical"; type ModuleFiltersState (line 20) | interface ModuleFiltersState { function useModuleFilters (line 44) | function useModuleFilters(allModules: ModuleData[]): ModuleFiltersState { FILE: garak-report/src/hooks/usePayloadParser.ts type PayloadInput (line 18) | type PayloadInput = string | PayloadObject; function isValidParsedPayload (line 25) | function isValidParsedPayload(value: unknown): value is Record, key: string, fallback: ... function getNumber (line 48) | function getNumber(obj: Record, key: string, fallback: ... function buildPayload (line 59) | function buildPayload(data: Record, fallbackName: strin... function createErrorPayload (line 76) | function createErrorPayload(rawValue: string): PayloadObject { FILE: garak-report/src/hooks/useProbeChartOptions.ts constant MODULE_COLORS (line 32) | const MODULE_COLORS = [ function useProbeChartOptions (line 41) | function useProbeChartOptions( FILE: garak-report/src/hooks/useProbeTooltip.ts function useProbeTooltip (line 28) | function useProbeTooltip( FILE: garak-report/src/hooks/useRenderLineItem.ts function useRenderLineItem (line 18) | function useRenderLineItem() { FILE: garak-report/src/hooks/useReportData.ts constant BUILD_REPORTS (line 21) | const BUILD_REPORTS: ReportEntry[] = typeof __GARAK_INSERT_HERE__ !== "u... type Window (line 27) | interface Window { type ReportDataState (line 35) | interface ReportDataState { function useReportData (line 55) | function useReportData(): ReportDataState { FILE: garak-report/src/hooks/useSeverityColor.ts type DefconKey (line 21) | type DefconKey = 1 | 2 | 3 | 4 | 5; function isDefconKey (line 28) | function isDefconKey(level: number | null | undefined): level is DefconK... function isBadgeColor (line 37) | function isBadgeColor(value: string): value is BadgeColor { FILE: garak-report/src/hooks/useSortedDetectors.ts function useSortedDetectors (line 18) | function useSortedDetectors() { FILE: garak-report/src/hooks/useThemeMode.ts type ThemeModeState (line 19) | interface ThemeModeState { function useThemeMode (line 38) | function useThemeMode( FILE: garak-report/src/hooks/useTooltipFormatter.ts function useTooltipFormatter (line 24) | function useTooltipFormatter() { FILE: garak-report/src/pages/Report.tsx type ReportProps (line 26) | interface ReportProps { function Report (line 42) | function Report({ onThemeChange, currentTheme = "system" }: ReportProps) { FILE: garak-report/src/pages/__tests__/Report.test.tsx type MockReportDetailsProps (line 167) | interface MockReportDetailsProps { FILE: garak-report/src/test-utils/mockTypes.ts type MockComponentProps (line 18) | interface MockComponentProps { type MockFlexProps (line 30) | interface MockFlexProps extends MockComponentProps { type MockStackProps (line 44) | interface MockStackProps extends MockComponentProps { type MockGridProps (line 52) | interface MockGridProps extends MockComponentProps { type MockGroupProps (line 59) | interface MockGroupProps extends MockComponentProps { type MockTextProps (line 68) | interface MockTextProps extends MockComponentProps { type MockAnchorProps (line 76) | interface MockAnchorProps extends MockComponentProps { type MockButtonProps (line 86) | interface MockButtonProps extends MockComponentProps { type MockTooltipProps (line 94) | interface MockTooltipProps extends MockComponentProps { type MockPopoverProps (line 99) | interface MockPopoverProps extends MockComponentProps { type MockCheckboxProps (line 105) | interface MockCheckboxProps extends MockComponentProps { type MockBadgeProps (line 116) | interface MockBadgeProps extends MockComponentProps { type MockDividerProps (line 123) | interface MockDividerProps extends MockComponentProps { type MockStatusMessageProps (line 128) | interface MockStatusMessageProps extends MockComponentProps { type MockPanelProps (line 140) | interface MockPanelProps extends MockComponentProps { type MockSidePanelProps (line 147) | interface MockSidePanelProps extends MockComponentProps { type MockNotificationProps (line 156) | interface MockNotificationProps extends MockComponentProps { type MockPageHeaderProps (line 164) | interface MockPageHeaderProps extends MockComponentProps { type MockAppBarProps (line 175) | interface MockAppBarProps extends MockComponentProps { type MockAppBarLogoProps (line 181) | interface MockAppBarLogoProps extends MockComponentProps { type MockSegmentedControlItem (line 190) | interface MockSegmentedControlItem { type MockSegmentedControlProps (line 196) | interface MockSegmentedControlProps extends MockComponentProps { type MockAccordionItem (line 208) | interface MockAccordionItem { type MockAccordionProps (line 215) | interface MockAccordionProps extends MockComponentProps { type MockTabItem (line 226) | interface MockTabItem { type MockTabsProps (line 234) | interface MockTabsProps extends MockComponentProps { type MockDefconBadgeProps (line 245) | interface MockDefconBadgeProps extends MockComponentProps { type MockEChartsOption (line 256) | interface MockEChartsOption { type MockEChartsProps (line 279) | interface MockEChartsProps { FILE: garak-report/src/types/Calibration.ts type Calibration (line 13) | type Calibration = { type CalibrationProps (line 23) | type CalibrationProps = { FILE: garak-report/src/types/CalibrationSummary.ts type CalibrationSummaryProps (line 16) | type CalibrationSummaryProps = { FILE: garak-report/src/types/Detector.ts type GroupedDetectorEntry (line 14) | interface GroupedDetectorEntry { type GroupedDetectors (line 42) | type GroupedDetectors = Record; FILE: garak-report/src/types/Eval.ts type GroupSummary (line 19) | type GroupSummary = ModuleData["summary"]; type ProbeSummary (line 25) | type ProbeSummary = Probe["summary"]; type EvalDetectorData (line 31) | type EvalDetectorData = Partial & { type EvalProbe (line 40) | interface EvalProbe { type EvalGroup (line 51) | interface EvalGroup { type EvalData (line 62) | type EvalData = Record; function isEvalGroup (line 69) | function isEvalGroup(value: unknown): value is EvalGroup { function isEvalProbe (line 83) | function isEvalProbe(value: unknown): value is EvalProbe { function isEvalDetectorData (line 96) | function isEvalDetectorData(value: unknown): value is EvalDetectorData { FILE: garak-report/src/types/Module.ts type ModuleData (line 17) | type ModuleData = { FILE: garak-report/src/types/ModuleEntry.ts type ModuleEntry (line 16) | type ModuleEntry = { FILE: garak-report/src/types/Payload.ts type PayloadObject (line 11) | type PayloadObject = { FILE: garak-report/src/types/ProbesChart.ts type Detector (line 15) | type Detector = { type Probe (line 38) | type Probe = { type Module (line 59) | type Module = { type ProbesChartProps (line 76) | type ProbesChartProps = { type ChartDetector (line 89) | type ChartDetector = { type ChartItemStyle (line 107) | interface ChartItemStyle { type ChartPointData (line 118) | interface ChartPointData { type ChartLineData (line 133) | interface ChartLineData { type ChartPointSeries (line 151) | interface ChartPointSeries { type ChartLineSeries (line 160) | interface ChartLineSeries { type ChartSeriesResult (line 170) | interface ChartSeriesResult { type EnrichedProbeData (line 181) | interface EnrichedProbeData extends Probe { FILE: garak-report/src/types/ReportEntry.ts type ReportEntry (line 18) | type ReportEntry = { type CalibrationData (line 52) | type CalibrationData = { type ReportDetailsProps (line 65) | type ReportDetailsProps = { FILE: garak-report/src/types/SetupSection.ts type SetupSectionProps (line 11) | type SetupSectionProps = { FILE: garak-report/src/types/Theme.ts type ThemeValue (line 11) | type ThemeValue = "light" | "dark" | "system"; FILE: garak-report/src/types/echarts.d.ts type EChartsOption (line 14) | interface EChartsOption { type ReactEChartsProps (line 18) | interface ReactEChartsProps { class ReactECharts (line 33) | class ReactECharts extends React.Component {} type EChartsTooltipParams (line 37) | interface EChartsTooltipParams { type EChartsDetectorData (line 47) | interface EChartsDetectorData { type EChartsRenderItemAPI (line 67) | interface EChartsRenderItemAPI { FILE: garak-report/src/utils/formatPercentage.ts function formatPercentage (line 27) | function formatPercentage(value: number, decimals: number = 2): string { function formatRate (line 46) | function formatRate(rate: number, decimals: number = 2): string { FILE: garak-report/vite.config.ts function injectExampleData (line 21) | function injectExampleData() { FILE: garak-report/vitest.setup.ts method observe (line 17) | observe() {} method unobserve (line 18) | unobserve() {} method disconnect (line 19) | disconnect() {} FILE: garak/__main__.py function main (line 8) | def main(): FILE: garak/_config.py class GarakSubConfig (line 48) | class GarakSubConfig: class BuffManager (line 53) | class BuffManager: class TransientConfig (line 60) | class TransientConfig(GarakSubConfig): function _lock_config_as_dict (line 90) | def _lock_config_as_dict(): function _crystallise (line 96) | def _crystallise(d): function _nested_dict (line 103) | def _nested_dict(): function _key_exists (line 130) | def _key_exists(d: dict, key: str) -> bool: function _set_settings (line 142) | def _set_settings(config_obj, settings_obj: dict): function _combine_into (line 148) | def _combine_into(d: dict, combined: dict) -> dict: function _load_config_files (line 159) | def _load_config_files(settings_filenames) -> dict: function _store_config (line 230) | def _store_config(settings_files) -> None: function _garak_user_agent (line 249) | def _garak_user_agent(dummy=None): function set_all_http_lib_agents (line 253) | def set_all_http_lib_agents(agent_string): function set_http_lib_agents (line 259) | def set_http_lib_agents(agent_strings: dict): function get_http_lib_agents (line 278) | def get_http_lib_agents(): function load_base_config (line 291) | def load_base_config() -> None: function load_config (line 299) | def load_config( function parse_plugin_spec (line 410) | def parse_plugin_spec( FILE: garak/_plugins.py class PluginEncoder (line 25) | class PluginEncoder(json.JSONEncoder): method default (line 26) | def default(self, obj): class PluginCache (line 39) | class PluginCache: method __init__ (line 57) | def __init__(self) -> None: method _get_detector_metrics (line 62) | def _get_detector_metrics(): method _extract_modules_klasses (line 76) | def _extract_modules_klasses(base_klass): method _load_plugin_cache (line 84) | def _load_plugin_cache(self): method _valid_loaded_cache (line 123) | def _valid_loaded_cache(self, local_cache, user_time): method _build_plugin_cache (line 165) | def _build_plugin_cache(self): method _enumerate_plugin_klasses (line 191) | def _enumerate_plugin_klasses(self, category: str) -> List[Callable]: method instance (line 222) | def instance() -> dict: method plugin_info (line 225) | def plugin_info(plugin: Union[Callable, str]) -> dict: class PluginProvider (line 335) | class PluginProvider: method getInstance (line 345) | def getInstance(klass_def, config_root): method storeInstance (line 351) | def storeInstance(plugin, config_root): function plugin_info (line 359) | def plugin_info(plugin: Union[Callable, str]) -> dict: function enumerate_plugins (line 363) | def enumerate_plugins( function load_plugin (line 396) | def load_plugin(path, break_on_fail=True, config_root=_config) -> object: FILE: garak/analyze/__init__.py class ABSOLUTE_DEFCON_BOUNDS (line 7) | class ABSOLUTE_DEFCON_BOUNDS(float, Enum): # for 0..1 class RELATIVE_DEFCON_BOUNDS (line 14) | class RELATIVE_DEFCON_BOUNDS(float, Enum): # for Z-scores function score_to_defcon (line 48) | def score_to_defcon(score: float, bounds) -> int: FILE: garak/analyze/aggregate_reports.py function _process_file_body (line 21) | def _process_file_body(in_file, out_file, aggregate_uuid) -> dict | None: function model_target_depr_notice (line 42) | def model_target_depr_notice(entry): function _aggregate_probespec (line 48) | def _aggregate_probespec(filenames: list[str]) -> str: function main (line 62) | def main(argv=None) -> None: FILE: garak/analyze/analyze_log.py function analyze_log (line 20) | def analyze_log(report_path: str) -> None: function main (line 101) | def main(argv=None) -> None: FILE: garak/analyze/calibration.py class Calibration (line 17) | class Calibration: method _load_calibration (line 20) | def _load_calibration( method _calc_z (line 75) | def _calc_z(self, mu: float, sigma: float, score: float) -> float: method get_z_score (line 79) | def get_z_score( method _build_path (line 101) | def _build_path(self, filename): method __init__ (line 104) | def __init__(self, calibration_path: Union[None, str, pathlib.Path] = ... FILE: garak/analyze/count_tokens.py function count_tokens (line 22) | def count_tokens(report_path: str) -> None: function main (line 64) | def main(argv=None) -> None: FILE: garak/analyze/get_tree.py function get_tree (line 21) | def get_tree(report_path: str) -> None: function main (line 70) | def main(argv=None) -> None: FILE: garak/analyze/misp.py function misp_report (line 25) | def misp_report(include_untagged: bool = True) -> None: function main (line 59) | def main(argv=None) -> None: FILE: garak/analyze/perf_stats.py function build_score_dict (line 25) | def build_score_dict(filenames): function main (line 59) | def main(argv=None) -> None: FILE: garak/analyze/qual_review.py function build_tiers (line 24) | def build_tiers() -> dict: function qual_review (line 39) | def qual_review(report_path: str) -> None: function main (line 176) | def main(argv=None) -> None: FILE: garak/analyze/report_avid.py function convert_to_avid (line 16) | def convert_to_avid(report_location: str) -> str: function main (line 118) | def main(argv=None) -> None: FILE: garak/analyze/report_digest.py function plugin_docstring_to_description (line 41) | def plugin_docstring_to_description(docstring): function _parse_report (line 45) | def _parse_report(reportfile: IO): function _report_header_content (line 74) | def _report_header_content(report_path, init, setup, payloads, config=_c... function _init_populate_result_db (line 92) | def _init_populate_result_db(evals, taxonomy=None): function _close_result_db (line 138) | def _close_result_db(conn): function _get_report_grouping (line 142) | def _get_report_grouping(cursor) -> List[str]: function _get_group_aggregate_score (line 152) | def _get_group_aggregate_score( function _get_group_info (line 200) | def _get_group_info(probe_group, group_score, taxonomy, config=_config) ... function _get_probe_result_summaries (line 233) | def _get_probe_result_summaries(cursor, probe_group) -> List[tuple]: function _get_probe_info (line 240) | def _get_probe_info(probe_module, probe_class, absolute_score) -> dict: function _get_detectors_info (line 258) | def _get_detectors_info(cursor, probe_group, probe_class) -> List[tuple]: function _get_probe_detector_details (line 265) | def _get_probe_detector_details( function _get_calibration_info (line 329) | def _get_calibration_info(calibration): function append_report_object (line 348) | def append_report_object(reportfile: IO, object: dict): function build_digest (line 357) | def build_digest(report_filename: str, config=_config): function build_html (line 445) | def build_html(digest: dict, config=_config) -> str: function _get_report_digest (line 472) | def _get_report_digest(report_path): FILE: garak/analyze/tbsa.py function build_tiers (line 28) | def build_tiers() -> dict: function round_final_tbsa (line 43) | def round_final_tbsa(raw_tbsa: float) -> float: function digest_to_tbsa (line 56) | def digest_to_tbsa(digest: dict, verbose=False, quiet=False) -> Tuple[fl... function main (line 222) | def main(argv=None) -> None: FILE: garak/attempt.py class Message (line 22) | class Message: method data (line 54) | def data(self): method data (line 70) | def data(self, value): method _load_data (line 85) | def _load_data(data_path: Union[str, Path]): class Turn (line 91) | class Turn: method from_dict (line 102) | def from_dict(cls, value: dict): class Conversation (line 120) | class Conversation: method last_message (line 132) | def last_message(self, role=None) -> Message: method from_dict (line 148) | def from_dict(value: dict): method from_openai (line 157) | def from_openai(cls, conv: List[dict], notes: Optional[dict] = None): class Attempt (line 173) | class Attempt: method __init__ (line 225) | def __init__( method as_dict (line 263) | def as_dict(self) -> dict: method prompt (line 298) | def prompt(self) -> Union[Conversation, None]: method lang (line 308) | def lang(self): method outputs (line 313) | def outputs(self) -> List[Message]: method all_outputs (line 330) | def all_outputs(self) -> List[Message]: method prompt (line 340) | def prompt(self, value: Message | Conversation): method outputs (line 356) | def outputs( method prompt_for (line 374) | def prompt_for(self, lang) -> Conversation: method outputs_for (line 391) | def outputs_for(self, lang) -> List[Message]: method _expand_prompt_to_histories (line 407) | def _expand_prompt_to_histories(self, breadth): method _add_turn (line 422) | def _add_turn(self, role: str, contents: List[Union[Message, str]]) ->... FILE: garak/buffs/base.py class Buff (line 18) | class Buff(Configurable): method __init__ (line 35) | def __init__(self, config_root=_config) -> None: method _derive_new_attempt (line 45) | def _derive_new_attempt( method transform (line 69) | def transform( method untransform (line 75) | def untransform(self, attempt: garak.attempt.Attempt) -> garak.attempt... method buff (line 79) | def buff( FILE: garak/buffs/encoding.py class Base64 (line 13) | class Base64(Buff): method transform (line 16) | def transform( class CharCode (line 31) | class CharCode(Buff): method transform (line 34) | def transform( FILE: garak/buffs/low_resource_languages.py class LRLBuff (line 23) | class LRLBuff(Buff): method __init__ (line 31) | def __init__(self, config_root=_config): method transform (line 35) | def transform( method untransform (line 54) | def untransform(self, attempt: garak.attempt.Attempt) -> garak.attempt... FILE: garak/buffs/lowercase.py class Lowercase (line 12) | class Lowercase(Buff): method transform (line 15) | def transform( FILE: garak/buffs/paraphrase.py class PegasusT5 (line 14) | class PegasusT5(Buff, HFCompatible): method __init__ (line 30) | def __init__(self, config_root=_config) -> None: method _load_unsafe (line 37) | def _load_unsafe(self): method _get_response (line 59) | def _get_response(self, input_text): method transform (line 80) | def transform( class Fast (line 98) | class Fast(Buff, HFCompatible): method __init__ (line 114) | def __init__(self, config_root=_config) -> None: method _load_unsafe (line 127) | def _load_unsafe(self): method _get_response (line 164) | def _get_response(self, input_text): method transform (line 200) | def transform( FILE: garak/cli.py function parse_cli_plugin_config (line 9) | def parse_cli_plugin_config(plugin_type, args): function main (line 39) | def main(arguments=None) -> None: FILE: garak/command.py function hint (line 13) | def hint(msg, logging=None): function deprecation_notice (line 24) | def deprecation_notice(deprecated_item: str, version: str, logging=None): function start_logging (line 32) | def start_logging(): function start_run (line 42) | def start_run(): function end_run (line 124) | def end_run(): function _tier_name (line 162) | def _tier_name(tier_value): function _truncate (line 171) | def _truncate(text, max_len=80): function print_plugins (line 193) | def print_plugins(prefix: str, color, selected_plugins=None, verbose: in... function _print_plugins_table (line 242) | def _print_plugins_table(sorted_items, prefix): function print_probes (line 278) | def print_probes(selected_probes=None, verbose=0): function print_detectors (line 290) | def print_detectors(selected_detectors=None): function print_generators (line 296) | def print_generators(): function print_buffs (line 302) | def print_buffs(): function plugin_info (line 309) | def plugin_info(plugin_name): function probewise_run (line 335) | def probewise_run(generator, probe_names, evaluator, buffs): function pxd_run (line 342) | def pxd_run(generator, probe_names, detector_names, evaluator, buffs): function _enumerate_obj_values (line 355) | def _enumerate_obj_values(o): function list_config (line 361) | def list_config(): function write_report_digest (line 372) | def write_report_digest(report_filename, html_report_filename): FILE: garak/configurable.py function _import_failed (line 14) | def _import_failed(absent_modules: List[str], calling_module: str): class Configurable (line 24) | class Configurable: method _load_deps (line 32) | def _load_deps(self, deps_override: List | None = None): method __getstate__ (line 55) | def __getstate__(self) -> object: method __setstate__ (line 65) | def __setstate__(self, d) -> object: method _load_config (line 72) | def _load_config(self, config_root=_config): method _apply_config (line 118) | def _apply_config(self, config): method _apply_run_defaults (line 150) | def _apply_run_defaults(self): method _apply_missing_instance_defaults (line 159) | def _apply_missing_instance_defaults(self): method _validate_env_var (line 169) | def _validate_env_var(self): FILE: garak/data/__init__.py class LocalDataPath (line 29) | class LocalDataPath(type(pathlib.Path())): method _determine_suffix (line 37) | def _determine_suffix(self): method _eval_paths (line 42) | def _eval_paths(self, segment, next_call, relative): method _glob (line 68) | def _glob(self, pattern, recursive=False): method glob (line 88) | def glob(self, pattern): method rglob (line 91) | def rglob(self, pattern): method _make_child (line 94) | def _make_child(self, segment): method joinpath (line 97) | def joinpath(self, *pathsegments): method with_segments (line 106) | def with_segments(self, *args): FILE: garak/detectors/always.py class Fail (line 13) | class Fail(Detector): method detect (line 18) | def detect(self, attempt: Attempt) -> List[float | None]: class Pass (line 22) | class Pass(Detector): method detect (line 27) | def detect(self, attempt: Attempt) -> List[float | None]: class Passthru (line 31) | class Passthru(Detector): method detect (line 40) | def detect(self, attempt: Attempt) -> List[float | None]: class Random (line 48) | class Random(Detector): method detect (line 53) | def detect(self, attempt: Attempt) -> List[float | None]: FILE: garak/detectors/ansiescape.py class Escaped (line 12) | class Escaped(StringDetector): method __init__ (line 20) | def __init__(self, config_root=_config): class Raw (line 28) | class Raw(StringDetector): method __init__ (line 36) | def __init__(self, config_root=_config): FILE: garak/detectors/any.py class AnyOutput (line 12) | class AnyOutput(Detector): method detect (line 19) | def detect(self, attempt: garak.attempt.Attempt) -> List[float]: class AnyNonspaceOutput (line 29) | class AnyNonspaceOutput(AnyOutput): method detect (line 32) | def detect(self, attempt: garak.attempt.Attempt) -> List[float]: FILE: garak/detectors/apikey.py class ApiKey (line 17) | class ApiKey(Detector): method detect (line 24) | def detect(self, attempt: garak.attempt.Attempt) -> List[float]: FILE: garak/detectors/base.py class Detector (line 20) | class Detector(Configurable): method _set_description (line 47) | def _set_description(self): method __init__ (line 59) | def __init__(self, config_root=_config): method detect (line 73) | def detect(self, attempt: garak.attempt.Attempt) -> Iterable[float | N... class HFDetector (line 81) | class HFDetector(Detector, HFCompatible): method __init__ (line 90) | def __init__(self, config_root=_config): method detect (line 155) | def detect(self, attempt: garak.attempt.Attempt) -> List[float | None]: class StringDetector (line 196) | class StringDetector(Detector): method __init__ (line 204) | def __init__(self, substrings, config_root=_config): method detect (line 208) | def detect(self, attempt: garak.attempt.Attempt) -> Iterable[float | N... class TriggerListDetector (line 240) | class TriggerListDetector(Detector): method detect (line 245) | def detect(self, attempt: garak.attempt.Attempt) -> Iterable[float | N... class FileDetector (line 270) | class FileDetector(Detector): method _test_file (line 275) | def _test_file(self, filename: str) -> Union[None, float]: method detect (line 278) | def detect(self, attempt: garak.attempt.Attempt) -> Iterable[float | N... FILE: garak/detectors/continuation.py class Continuation (line 14) | class Continuation(Detector): method detect (line 23) | def detect(self, attempt: Attempt) -> List[float]: FILE: garak/detectors/dan.py class DANDetectorMeta (line 9) | class DANDetectorMeta(type): method __new__ (line 14) | def __new__(cls, name, bases, attrs, substrings=None, **kwargs): class DAN (line 36) | class DAN( class AntiDAN (line 46) | class AntiDAN( class DANJailbreak (line 56) | class DANJailbreak( class STAN (line 66) | class STAN( class DUDE (line 76) | class DUDE( class DevMode (line 86) | class DevMode( class MarkdownLink (line 96) | class MarkdownLink( FILE: garak/detectors/divergence.py class RepeatDiverges (line 14) | class RepeatDiverges(Detector): method __init__ (line 25) | def __init__(self, config_root=_config): method _instance_is_a_hit (line 32) | def _instance_is_a_hit(self, output: str, repeat_word: str): method detect (line 90) | def detect(self, attempt: Attempt) -> List[float]: class RepeatedToken (line 111) | class RepeatedToken(Detector): method __init__ (line 142) | def __init__(self, config_root=_config): method detect (line 145) | def detect(self, attempt): FILE: garak/detectors/encoding.py class DecodeMatch (line 13) | class DecodeMatch(StringDetector): method __init__ (line 20) | def __init__(self, config_root=_config): method detect (line 23) | def detect(self, attempt: Attempt) -> Iterable[float]: class DecodeApprox (line 30) | class DecodeApprox(Detector): method __init__ (line 42) | def __init__(self, config_root=_config): method _ngram_match_func (line 45) | def _ngram_match_func(self, target: str, text: str, case_sensitive=Fal... method detect (line 58) | def detect(self, attempt: Attempt): FILE: garak/detectors/exploitation.py class JinjaTemplateInjectionDetector (line 50) | class JinjaTemplateInjectionDetector(Detector): method detect (line 76) | def detect(self, attempt: garak.attempt.Attempt) -> List[float]: class PythonCodeExecution (line 96) | class PythonCodeExecution(Detector): method detect (line 118) | def detect(self, attempt: garak.attempt.Attempt) -> List[float]: class SQLiSuccess (line 140) | class SQLiSuccess(StringDetector): method __init__ (line 169) | def __init__(self, config_root=_config): class SQLiEcho (line 173) | class SQLiEcho(Detector): method detect (line 198) | def detect(self, attempt: garak.attempt.Attempt) -> List[float]: FILE: garak/detectors/fileformats.py class PossiblePickleName (line 14) | class PossiblePickleName(FileDetector): method _test_file (line 26) | def _test_file(self, filename): class FileIsPickled (line 35) | class FileIsPickled(FileDetector): method _test_file (line 42) | def _test_file(self, filename): class FileIsExecutable (line 72) | class FileIsExecutable(FileDetector): method _load_deps (line 92) | def _load_deps(self, deps_override=None): method _test_file (line 102) | def _test_file(self, filename): FILE: garak/detectors/goodside.py class RileyIsnt (line 15) | class RileyIsnt(StringDetector): method __init__ (line 23) | def __init__(self, config_root=_config): class PlainJSON (line 54) | class PlainJSON(Detector): method __init__ (line 64) | def __init__(self, config_root=_config): method detect (line 68) | def detect(self, attempt: Attempt): class Glitch (line 82) | class Glitch(TriggerListDetector): method detect (line 90) | def detect(self, attempt: Attempt) -> List[float | None]: FILE: garak/detectors/judge.py class ModelAsJudge (line 16) | class ModelAsJudge(Detector, EvaluationJudge): method _load_generator (line 48) | def _load_generator(self): method __init__ (line 80) | def __init__(self, config_root=_config): method detect (line 84) | def detect(self, attempt: Attempt) -> List[float | None]: class Refusal (line 119) | class Refusal(ModelAsJudge): method __init__ (line 146) | def __init__(self, config_root=_config): method detect (line 151) | def detect(self, attempt: Attempt) -> List[float | None]: class RefusalOnlyAdversarial (line 156) | class RefusalOnlyAdversarial(Refusal): method detect (line 165) | def detect(self, attempt: Attempt) -> List[float | None]: FILE: garak/detectors/knownbadsignatures.py class EICAR (line 12) | class EICAR(StringDetector): method __init__ (line 21) | def __init__(self, config_root=_config): class GTUBE (line 26) | class GTUBE(StringDetector): method __init__ (line 35) | def __init__(self, config_root=_config): class GTphish (line 40) | class GTphish(StringDetector): method __init__ (line 49) | def __init__(self, config_root=_config): FILE: garak/detectors/leakreplay.py class StartsWith (line 13) | class StartsWith(Detector): method detect (line 23) | def detect(self, attempt: Attempt) -> List[float]: FILE: garak/detectors/lmrc.py class Anthro (line 11) | class Anthro(StringDetector): method __init__ (line 20) | def __init__(self, config_root=_config): class QuackMedicine (line 25) | class QuackMedicine(StringDetector): method __init__ (line 34) | def __init__(self, config_root=_config): FILE: garak/detectors/malwaregen.py class AnyCode (line 44) | class AnyCode(Detector): method detect (line 52) | def detect(self, attempt: garak.attempt.Attempt) -> List[float]: FILE: garak/detectors/misleading.py class MustRefuteClaimModel (line 13) | class MustRefuteClaimModel(HFDetector): method detect (line 32) | def detect(self, attempt: Attempt) -> List[float | None]: class MustRefuteClaimKW (line 39) | class MustRefuteClaimKW(StringDetector): method __init__ (line 46) | def __init__(self, config_root=_config): method detect (line 50) | def detect(self, attempt: Attempt) -> List[float | None]: class MustContradictNLI (line 57) | class MustContradictNLI(HFDetector): method detect (line 76) | def detect(self, attempt: Attempt) -> List[float | None]: FILE: garak/detectors/mitigation.py class MitigationBypass (line 13) | class MitigationBypass(StringDetector): method __init__ (line 33) | def __init__(self, config_root=_config): method detect (line 194) | def detect(self, attempt: Attempt): class Prefixes (line 199) | class Prefixes(StringDetector): method __init__ (line 206) | def __init__(self, config_root=_config): method detect (line 238) | def detect(self, attempt: Attempt) -> List[float | None]: FILE: garak/detectors/packagehallucination.py class PackageHallucinationDetector (line 33) | class PackageHallucinationDetector(Detector, ABC): method language_name (line 46) | def language_name(self) -> str: method _extract_package_references (line 51) | def _extract_package_references(self, output: str) -> Set[str]: method _load_package_list (line 55) | def _load_package_list(self): method detect (line 97) | def detect(self, attempt: Attempt) -> List[float | None]: class PythonPypi (line 133) | class PythonPypi(PackageHallucinationDetector): method _load_package_list (line 144) | def _load_package_list(self): method _extract_package_references (line 150) | def _extract_package_references(self, output: str) -> Set[str]: class RubyGems (line 160) | class RubyGems(PackageHallucinationDetector): method _extract_package_references (line 171) | def _extract_package_references(self, output: str) -> Set[str]: class JavaScriptNpm (line 181) | class JavaScriptNpm(PackageHallucinationDetector): method _extract_package_references (line 192) | def _extract_package_references(self, output: str) -> Set[str]: class RustCrates (line 210) | class RustCrates(PackageHallucinationDetector): method _load_package_list (line 221) | def _load_package_list(self): method _extract_package_references (line 235) | def _extract_package_references(self, output: str) -> Set[str]: class RakuLand (line 242) | class RakuLand(PackageHallucinationDetector): method _extract_package_references (line 253) | def _extract_package_references(self, output: str) -> Set[str]: class Perl (line 266) | class Perl(PackageHallucinationDetector): method _extract_package_references (line 277) | def _extract_package_references(self, output: str) -> Set[str]: class Dart (line 285) | class Dart(PackageHallucinationDetector): method _load_package_list (line 296) | def _load_package_list(self): method _extract_package_references (line 301) | def _extract_package_references(self, output: str) -> Set[str]: FILE: garak/detectors/perspective.py function constructor (line 189) | def constructor(self, config_root=_config): function detect (line 195) | def detect(self, attempt): function _get_perspective_response (line 209) | def _get_perspective_response(self, text): function _init_client (line 223) | def _init_client(self): FILE: garak/detectors/productkey.py class Win5x5 (line 15) | class Win5x5(Detector): method detect (line 24) | def detect(self, attempt: garak.attempt.Attempt) -> List[float]: FILE: garak/detectors/promptinject.py class AttackRogueString (line 13) | class AttackRogueString(Detector): method detect (line 23) | def detect(self, attempt: Attempt) -> List[float]: FILE: garak/detectors/shields.py class Up (line 21) | class Up(StringDetector): method __init__ (line 45) | def __init__(self, config_root=_config): method detect (line 50) | def detect(self, attempt: Attempt) -> List[float]: class Down (line 55) | class Down(StringDetector): method __init__ (line 78) | def __init__(self, config_root=_config): method detect (line 83) | def detect(self, attempt: Attempt) -> List[float]: FILE: garak/detectors/snowball.py class DontStartNo (line 14) | class DontStartNo(Detector): method detect (line 22) | def detect(self, attempt: Attempt): class DontStartYes (line 40) | class DontStartYes(Detector): method detect (line 48) | def detect(self, attempt: Attempt): FILE: garak/detectors/unsafe_content.py class S_nlpDetox (line 12) | class S_nlpDetox(HFDetector): class Martin_haDistilbert (line 29) | class Martin_haDistilbert(HFDetector): class ToxicCommentModel (line 46) | class ToxicCommentModel(S_nlpDetox): class SurgeProfanitySexual (line 83) | class SurgeProfanitySexual(StringDetector): method __init__ (line 95) | def __init__(self, config_root=_config): class SurgeProfanityBodilyFluids (line 100) | class SurgeProfanityBodilyFluids(StringDetector): method __init__ (line 112) | def __init__(self, config_root=_config): class SurgeProfanitySexualOrientationGender (line 117) | class SurgeProfanitySexualOrientationGender(StringDetector): method __init__ (line 133) | def __init__(self, config_root=_config): class SurgeProfanityRacialEthnic (line 138) | class SurgeProfanityRacialEthnic(StringDetector): method __init__ (line 154) | def __init__(self, config_root=_config): class SurgeProfanityMentalDisability (line 159) | class SurgeProfanityMentalDisability(StringDetector): method __init__ (line 175) | def __init__(self, config_root=_config): class SurgeProfanityPhysicalDisability (line 180) | class SurgeProfanityPhysicalDisability(StringDetector): method __init__ (line 196) | def __init__(self, config_root=_config): class SurgeProfanityPhysicalAttributes (line 201) | class SurgeProfanityPhysicalAttributes(StringDetector): method __init__ (line 213) | def __init__(self, config_root=_config): class SurgeProfanityAnimalReferences (line 218) | class SurgeProfanityAnimalReferences(StringDetector): method __init__ (line 232) | def __init__(self, config_root=_config): class SurgeProfanityReligious (line 237) | class SurgeProfanityReligious(StringDetector): method __init__ (line 249) | def __init__(self, config_root=_config): class SurgeProfanityPolitical (line 254) | class SurgeProfanityPolitical(StringDetector): method __init__ (line 271) | def __init__(self, config_root=_config): class OfcomOffensiveGeneral (line 276) | class OfcomOffensiveGeneral(StringDetector): method __init__ (line 287) | def __init__(self, config_root=_config): class OfcomOffensiveSexual (line 292) | class OfcomOffensiveSexual(StringDetector): method __init__ (line 305) | def __init__(self, config_root=_config): class OfcomOffensiveDiscriminatory (line 310) | class OfcomOffensiveDiscriminatory(StringDetector): method __init__ (line 327) | def __init__(self, config_root=_config): class OfcomOffensiveSexGender (line 332) | class OfcomOffensiveSexGender(StringDetector): method __init__ (line 351) | def __init__(self, config_root=_config): class OfcomOffensiveMentalHealth (line 356) | class OfcomOffensiveMentalHealth(StringDetector): method __init__ (line 375) | def __init__(self, config_root=_config): class OfcomOffensiveRaceEthnic (line 380) | class OfcomOffensiveRaceEthnic(StringDetector): method __init__ (line 397) | def __init__(self, config_root=_config): class LDNOOBW (line 402) | class LDNOOBW(StringDetector): method __init__ (line 414) | def __init__(self, config_root=_config): class SlursReclaimedSlurs (line 428) | class SlursReclaimedSlurs(StringDetector): method __init__ (line 442) | def __init__(self, config_root=_config): FILE: garak/detectors/visual_jailbreak.py class FigStep (line 10) | class FigStep(StringDetector): method __init__ (line 19) | def __init__(self, config_root=_config): FILE: garak/detectors/web_injection.py class MarkdownExfilBasic (line 27) | class MarkdownExfilBasic(Detector): method detect (line 37) | def detect(self, attempt: garak.attempt.Attempt) -> List[float]: class MarkdownExfilExtendedImage (line 47) | class MarkdownExfilExtendedImage(Detector): method detect (line 68) | def detect(self, attempt: garak.attempt.Attempt) -> List[float]: class MarkdownExfilExtendedNonImage (line 91) | class MarkdownExfilExtendedNonImage(Detector): method detect (line 112) | def detect(self, attempt: garak.attempt.Attempt) -> List[float]: class MarkdownExfilContent (line 135) | class MarkdownExfilContent(Detector): method detect (line 146) | def detect(self, attempt: garak.attempt.Attempt) -> List[float]: class PlaygroundMarkdownExfil (line 179) | class PlaygroundMarkdownExfil(MarkdownExfilBasic): class XSS (line 187) | class XSS(StringDetector): method __init__ (line 198) | def __init__(self, config_root=_config): method _load_substrings (line 202) | def _load_substrings(self): FILE: garak/evaluators/base.py class Evaluator (line 19) | class Evaluator: method __init__ (line 31) | def __init__(self): method test (line 36) | def test(self, test_value: float) -> bool: method evaluate (line 45) | def evaluate(self, attempts: Iterable[garak.attempt.Attempt]) -> None: method get_z_rating (line 152) | def get_z_rating(self, probe_name, detector_name, asr_pct) -> str: method print_results_wide (line 169) | def print_results_wide( method print_results_narrow (line 218) | def print_results_narrow( class ZeroToleranceEvaluator (line 270) | class ZeroToleranceEvaluator(Evaluator): method __init__ (line 273) | def __init__(): method test (line 276) | def test(self, test_value): class ThresholdEvaluator (line 280) | class ThresholdEvaluator(Evaluator): method __init__ (line 283) | def __init__(self, threshold=0.5): method test (line 289) | def test(self, test_value): FILE: garak/evaluators/maxrecall.py class MaxRecallEvaluator (line 11) | class MaxRecallEvaluator(Evaluator): method __init__ (line 12) | def __init__(): method evaluate (line 15) | def evaluate(self, results): FILE: garak/exception.py class GarakException (line 5) | class GarakException(Exception): class APIKeyMissingError (line 9) | class APIKeyMissingError(GarakException): class TargetNameMissingError (line 13) | class TargetNameMissingError(GarakException): class GeneratorBackoffTrigger (line 17) | class GeneratorBackoffTrigger(GarakException): class PluginConfigurationError (line 21) | class PluginConfigurationError(GarakException): class BadGeneratorException (line 25) | class BadGeneratorException(PluginConfigurationError): class RateLimitHit (line 29) | class RateLimitHit(Exception): class ConfigFailure (line 33) | class ConfigFailure(GarakException): class PayloadFailure (line 37) | class PayloadFailure(GarakException): FILE: garak/generators/azure.py class AzureOpenAIGenerator (line 32) | class AzureOpenAIGenerator(OpenAICompatible): method _validate_env_var (line 61) | def _validate_env_var(self): method _load_unsafe (line 86) | def _load_unsafe(self): FILE: garak/generators/base.py class Generator (line 21) | class Generator(Configurable): method __init__ (line 50) | def __init__(self, name="", config_root=_config): method _call_model (line 74) | def _call_model( method _pre_generate_hook (line 86) | def _pre_generate_hook(self): method _verify_target_result (line 90) | def _verify_target_result(result: List[Union[Message, None]]): method clear_history (line 99) | def clear_history(self): method _post_generate_hook (line 102) | def _post_generate_hook( method _prune_skip_sequences (line 107) | def _prune_skip_sequences( method generate (line 138) | def generate( method _conversation_to_list (line 242) | def _conversation_to_list(conversation: Conversation) -> list[dict]: FILE: garak/generators/bedrock.py class BedrockGenerator (line 39) | class BedrockGenerator(Generator): method __init__ (line 56) | def __init__(self, name="", config_root=_config): method _validate_env_var (line 110) | def _validate_env_var(self): method _load_unsafe (line 124) | def _load_unsafe(self): method _conversation_to_list (line 138) | def _conversation_to_list(conversation: Conversation) -> list[dict]: method _call_model (line 161) | def _call_model( FILE: garak/generators/cohere.py class CohereGenerator (line 31) | class CohereGenerator(Generator): method __init__ (line 57) | def __init__(self, name="command", config_root=_config): method _call_cohere_api (line 82) | def _call_cohere_api(self, prompt_text, request_size=COHERE_GENERATION... method _call_model (line 191) | def _call_model( FILE: garak/generators/function.py class Single (line 54) | class Single(Generator): method __init__ (line 68) | def __init__( method _call_model (line 94) | def _call_model( class Multiple (line 101) | class Multiple(Single): method _call_model (line 110) | def _call_model( FILE: garak/generators/ggml.py class GgmlGenerator (line 28) | class GgmlGenerator(Generator): method _command_args_list (line 51) | def _command_args_list(self): method __init__ (line 73) | def __init__(self, name="", config_root=_config): method _validate_env_var (line 105) | def _validate_env_var(self): method _call_model (line 108) | def _call_model( FILE: garak/generators/groq.py class GroqChat (line 11) | class GroqChat(OpenAICompatible): method _load_unsafe (line 41) | def _load_unsafe(self): method _call_model (line 52) | def _call_model( FILE: garak/generators/guardrails.py class NeMoGuardrails (line 15) | class NeMoGuardrails(Generator): method __init__ (line 22) | def __init__(self, name="", config_root=_config): method _call_model (line 36) | def _call_model( FILE: garak/generators/huggingface.py class HFRateLimitException (line 34) | class HFRateLimitException(GarakException): class HFLoadingException (line 38) | class HFLoadingException(GarakException): class HFInternalServerError (line 42) | class HFInternalServerError(GarakException): class Pipeline (line 46) | class Pipeline(Generator, HFCompatible): method __init__ (line 60) | def __init__(self, name="", config_root=_config): method _load_unsafe (line 72) | def _load_unsafe(self): method _call_model (line 127) | def _call_model( class InferenceAPI (line 183) | class InferenceAPI(Generator): method __init__ (line 198) | def __init__(self, name="", config_root=_config): method _call_model (line 224) | def _call_model( method _pre_generate_hook (line 305) | def _pre_generate_hook(self): class InferenceEndpoint (line 309) | class InferenceEndpoint(InferenceAPI): method __init__ (line 320) | def __init__(self, name="", config_root=_config): method _call_model (line 334) | def _call_model( class Model (line 367) | class Model(Pipeline, HFCompatible): method _load_unsafe (line 373) | def _load_unsafe(self): method _call_model (line 440) | def _call_model( class LLaVA (line 505) | class LLaVA(Generator, HFCompatible): method _load_deps (line 513) | def _load_deps(self, deps_override: List | None = None): method __init__ (line 542) | def __init__(self, name="", config_root=_config): method generate (line 585) | def generate( FILE: garak/generators/langchain.py class LangChainLLMGenerator (line 13) | class LangChainLLMGenerator(Generator): method __init__ (line 48) | def __init__(self, name="", config_root=_config): method _load_unsafe (line 56) | def _load_unsafe(self): method _call_model (line 71) | def _call_model( FILE: garak/generators/langchain_serve.py class LangChainServeLLMGenerator (line 15) | class LangChainServeLLMGenerator(Generator): method __init__ (line 39) | def __init__( method _validate_env_var (line 50) | def _validate_env_var(self): method _validate_uri (line 57) | def _validate_uri(uri): method _call_model (line 66) | def _call_model( FILE: garak/generators/litellm.py class LiteLLMGenerator (line 68) | class LiteLLMGenerator(Generator): method __init__ (line 104) | def __init__(self, name: str = "", generations: int = 10, config_root=... method _call_model (line 132) | def _call_model( FILE: garak/generators/mistral.py class MistralGenerator (line 13) | class MistralGenerator(Generator): method _load_unsafe (line 30) | def _load_unsafe(self): method __init__ (line 33) | def __init__(self, name="", config_root=_config): method _call_model (line 38) | def _call_model( FILE: garak/generators/nemo.py class NeMoGenerator (line 20) | class NeMoGenerator(Generator): method __init__ (line 41) | def __init__(self, name=None, config_root=_config): method _validate_env_var (line 57) | def _validate_env_var(self): method _call_model (line 77) | def _call_model( FILE: garak/generators/nim.py class NVOpenAIChat (line 17) | class NVOpenAIChat(OpenAICompatible): method _load_unsafe (line 56) | def _load_unsafe(self): method _prepare_prompt (line 67) | def _prepare_prompt(self, prompt: Conversation) -> Conversation: method _call_model (line 70) | def _call_model( method __init__ (line 105) | def __init__(self, name="", config_root=_config): class NVOpenAICompletion (line 113) | class NVOpenAICompletion(NVOpenAIChat): method _load_unsafe (line 134) | def _load_unsafe(self): class NVMultimodal (line 139) | class NVMultimodal(NVOpenAIChat): method _prepare_prompt (line 175) | def _prepare_prompt(self, conv: Conversation) -> Conversation: class Vision (line 226) | class Vision(NVMultimodal): FILE: garak/generators/nvcf.py class NvcfChat (line 20) | class NvcfChat(Generator): method __init__ (line 40) | def __init__(self, name=None, config_root=_config): method _build_payload (line 64) | def _build_payload(self, prompt: Conversation) -> dict: method _extract_text_output (line 80) | def _extract_text_output(self, response) -> str: method _call_model (line 93) | def _call_model( class NvcfCompletion (line 156) | class NvcfCompletion(NvcfChat): method _build_payload (line 159) | def _build_payload(self, prompt: Conversation) -> dict: method _extract_text_output (line 175) | def _extract_text_output(self, response) -> str: FILE: garak/generators/ollama.py function _give_up (line 14) | def _give_up(error): class OllamaGenerator (line 22) | class OllamaGenerator(Generator): method __init__ (line 38) | def __init__(self, name="", config_root=_config): method _call_model (line 54) | def _call_model( class OllamaGeneratorChat (line 73) | class OllamaGeneratorChat(OllamaGenerator): method _call_model (line 88) | def _call_model( FILE: garak/generators/openai.py class OpenAICompatible (line 134) | class OpenAICompatible(Generator): method _load_unsafe (line 159) | def _load_unsafe(self): method _validate_config (line 169) | def _validate_config(self): method __init__ (line 172) | def __init__(self, name="", config_root=_config): method _conversation_to_list (line 193) | def _conversation_to_list(conversation: Conversation) -> list[dict]: method _call_model (line 259) | def _call_model( class OpenAIGenerator (line 357) | class OpenAIGenerator(OpenAICompatible): method _load_unsafe (line 370) | def _load_unsafe(self): method __init__ (line 402) | def __init__(self, name="", config_root=_config): class OpenAIReasoningGenerator (line 411) | class OpenAIReasoningGenerator(OpenAIGenerator): FILE: garak/generators/rasa.py class RasaRestGenerator (line 16) | class RasaRestGenerator(RestGenerator): FILE: garak/generators/replicate.py class ReplicateGenerator (line 23) | class ReplicateGenerator(Generator): method __init__ (line 42) | def __init__(self, name="", config_root=_config): method _load_unsafe (line 53) | def _load_unsafe(self): method _call_model (line 57) | def _call_model( class InferenceEndpoint (line 85) | class InferenceEndpoint(ReplicateGenerator): method _call_model (line 92) | def _call_model( FILE: garak/generators/rest.py class RestGenerator (line 29) | class RestGenerator(Generator): method __init__ (line 76) | def __init__(self, uri=None, config_root=_config): method _validate_env_var (line 156) | def _validate_env_var(self): method _json_escape (line 165) | def _json_escape(self, text: str) -> str: method _populate_template (line 170) | def _populate_template( method _call_model (line 197) | def _call_model( FILE: garak/generators/test.py class Blank (line 14) | class Blank(Generator): method _call_model (line 21) | def _call_model( class Repeat (line 27) | class Repeat(Generator): method _call_model (line 34) | def _call_model( class Single (line 40) | class Single(Generator): method _call_model (line 48) | def _call_model( class Nones (line 59) | class Nones(Generator): method _call_model (line 66) | def _call_model( class Lipsum (line 72) | class Lipsum(Generator): method _call_model (line 79) | def _call_model( class BlankVision (line 85) | class BlankVision(Generator): method _call_model (line 93) | def _call_model( FILE: garak/generators/watsonx.py class WatsonXGenerator (line 11) | class WatsonXGenerator(Generator): method __init__ (line 39) | def __init__(self, name="", config_root=_config): method _set_bearer_token (line 45) | def _set_bearer_token(self, iam_url="https://iam.cloud.ibm.com/identit... method _generate_with_project (line 56) | def _generate_with_project(self, payload): method _generate_with_deployment (line 82) | def _generate_with_deployment(self, payload): method _validate_env_var (line 99) | def _validate_env_var(self): method _call_model (line 129) | def _call_model( FILE: garak/generators/websocket.py class WebSocketGenerator (line 27) | class WebSocketGenerator(Generator): method __init__ (line 75) | def __init__(self, uri=None, config_root=_config): method _validate_env_var (line 112) | def _validate_env_var(self): method _setup_auth (line 134) | def _setup_auth(self): method _format_message (line 152) | def _format_message(self, prompt: str) -> str: method _apply_replacements (line 175) | def _apply_replacements(self, obj: Any, replacements: Dict[str, str]) ... method _extract_response_text (line 190) | def _extract_response_text(self, response: str) -> str: method _connect_websocket (line 228) | async def _connect_websocket(self): method _send_and_receive (line 272) | async def _send_and_receive(self, message: str) -> str: method _generate_async (line 346) | async def _generate_async(self, prompt: str) -> str: method _has_system_prompt (line 352) | def _has_system_prompt(self, prompt: Conversation) -> bool: method _has_single_turn (line 360) | def _has_single_turn(self, prompt: Conversation) -> bool: method _call_model (line 364) | def _call_model( method __del__ (line 411) | def __del__(self): FILE: garak/harnesses/base.py function _initialize_runtime_services (line 27) | def _initialize_runtime_services(): class Harness (line 50) | class Harness(Configurable): method __init__ (line 61) | def __init__(self, config_root=_config): method _load_buffs (line 68) | def _load_buffs(self, buff_names: List) -> None: method _start_run_hook (line 97) | def _start_run_hook(self): method _end_run_hook (line 101) | def _end_run_hook(self): method run (line 104) | def run(self, model, probes, detectors, evaluator, announce_probe=True... function _modality_match (line 188) | def _modality_match(probe_modality, generator_modality, strict): FILE: garak/harnesses/probewise.py class ProbewiseHarness (line 18) | class ProbewiseHarness(Harness): method _load_detector (line 19) | def _load_detector(self, detector_name: str) -> Detector: method run (line 30) | def run(self, model, probenames, evaluator, buff_names=None): FILE: garak/harnesses/pxd.py class PxD (line 22) | class PxD(Harness): method run (line 23) | def run(self, model, probe_names, detector_names, evaluator, buff_name... FILE: garak/interactive.py function _get_list_parser (line 23) | def _get_list_parser(): function print_plugins (line 54) | def print_plugins(prefix, color): class GarakCommands (line 70) | class GarakCommands(cmd2.CommandSet): method __init__ (line 71) | def __init__(self): method do_list (line 76) | def do_list(self, args): method do_probe (line 99) | def do_probe(self, args): class GarakTerminal (line 144) | class GarakTerminal(cmd2.Cmd): method __init__ (line 149) | def __init__(self): method default (line 195) | def default(self, command: str) -> None: method postcmd (line 200) | def postcmd(self, stop, line): method _load_garak (line 216) | def _load_garak(self): method do_quit (line 223) | def do_quit(self, args): method settings_ns_provider (line 227) | def settings_ns_provider(self) -> argparse.Namespace: function banner (line 234) | def banner(): function interactive_mode (line 241) | def interactive_mode(): FILE: garak/langproviders/base.py function _initialize_words (line 18) | def _initialize_words(): function remove_english_punctuation (line 29) | def remove_english_punctuation(text: str) -> str: function is_english (line 38) | def is_english(text): function split_input_text (line 79) | def split_input_text(input_text: str) -> list: function contains_invisible_unicode (line 95) | def contains_invisible_unicode(text: str) -> bool: function is_meaning_string (line 105) | def is_meaning_string(text: str) -> bool: class LangProvider (line 137) | class LangProvider(Configurable): method __init__ (line 140) | def __init__(self, config_root: dict = {}) -> None: method _load_langprovider (line 150) | def _load_langprovider(self): method _translate (line 153) | def _translate(self, text: str) -> str: method _get_response (line 156) | def _get_response(self, input_text: str): method _short_sentence_translate (line 176) | def _short_sentence_translate(self, line: str) -> str: method _long_sentence_translate (line 195) | def _long_sentence_translate(self, line: str) -> str: method _should_skip_line (line 208) | def _should_skip_line(self, line: str) -> bool: method _clean_line (line 217) | def _clean_line(self, line: str) -> str: method get_text (line 220) | def get_text( FILE: garak/langproviders/local.py class Passthru (line 14) | class Passthru(LangProvider): method _load_langprovider (line 17) | def _load_langprovider(self): method _translate (line 20) | def _translate(self, text: str) -> str: method get_text (line 23) | def get_text( class LocalHFTranslator (line 32) | class LocalHFTranslator(LangProvider, HFCompatible): method __init__ (line 48) | def __init__(self, config_root: dict = {}) -> None: method _load_langprovider (line 59) | def _load_langprovider(self): method _translate (line 123) | def _translate(self, text: str) -> str: FILE: garak/langproviders/remote.py class RivaTranslator (line 17) | class RivaTranslator(LangProvider): method _load_unsafe (line 51) | def _load_unsafe(self): method _load_langprovider (line 54) | def _load_langprovider(self): method _translate (line 84) | def _translate(self, text: str) -> str: class DeeplTranslator (line 97) | class DeeplTranslator(LangProvider): method _load_langprovider (line 125) | def _load_langprovider(self): method _load_unsafe (line 147) | def _load_unsafe(self): method _translate (line 150) | def _translate(self, text: str) -> str: class GoogleTranslator (line 160) | class GoogleTranslator(LangProvider): method _validate_env_var (line 171) | def _validate_env_var(self): method _load_langprovider (line 195) | def _load_langprovider(self): method _load_unsafe (line 230) | def _load_unsafe(self): method _translate (line 233) | def _translate(self, text: str) -> str: FILE: garak/langservice.py function tasks (line 19) | def tasks() -> List[str]: function enabled (line 32) | def enabled() -> bool: function start_msg (line 39) | def start_msg() -> str: function _load_langprovider (line 44) | def _load_langprovider(language_service: dict) -> LangProvider: function load (line 67) | def load(): function get_langprovider (line 105) | def get_langprovider(source: str, *, reverse: bool = False): FILE: garak/payloads.py function _validate_payload (line 39) | def _validate_payload(payload_json): class PayloadGroup (line 47) | class PayloadGroup: method _load (line 52) | def _load(self): method __init__ (line 116) | def __init__(self, name: str, path) -> None: class Director (line 127) | class Director: method _scan_payload_dir (line 134) | def _scan_payload_dir(self, dir) -> dict: method _refresh_payloads (line 166) | def _refresh_payloads(self) -> None: method search (line 171) | def search( method _load_payload (line 199) | def _load_payload( method load (line 206) | def load(self, name) -> PayloadGroup: method __init__ (line 226) | def __init__(self) -> None: function search (line 232) | def search( function load (line 238) | def load(name: str) -> PayloadGroup: FILE: garak/probes/_tier.py class Tier (line 9) | class Tier(IntEnum): FILE: garak/probes/ansiescape.py class AnsiEscaped (line 49) | class AnsiEscaped(garak.probes.Probe): method __init__ (line 70) | def __init__(self, config_root=_config): class AnsiRaw (line 84) | class AnsiRaw(AnsiEscaped): method __init__ (line 95) | def __init__(self, config_root=_config): class AnsiRawTokenizerHF (line 112) | class AnsiRawTokenizerHF(garak.probes.Probe): method probe (line 135) | def probe(self, generator) -> Iterable[garak.attempt.Attempt]: FILE: garak/probes/apikey.py class GetKey (line 14) | class GetKey(garak.probes.Probe): method __init__ (line 33) | def __init__(self, config_root=_config): class CompleteKey (line 44) | class CompleteKey(garak.probes.Probe): method __init__ (line 71) | def __init__(self, config_root=_config): FILE: garak/probes/atkgen.py class Tox (line 36) | class Tox(garak.probes.Probe): method probe (line 77) | def probe(self, generator) -> List[garak.attempt.Attempt]: method _build_red_team_model_config (line 269) | def _build_red_team_model_config(self): method __init__ (line 286) | def __init__(self, config_root=_config): FILE: garak/probes/audio.py class AudioAchillesHeel (line 20) | class AudioAchillesHeel(garak.probes.Probe): method __init__ (line 43) | def __init__(self, config_root=_config): method _load_data (line 49) | def _load_data(self): method probe (line 92) | def probe(self, generator) -> Iterable[Attempt]: FILE: garak/probes/av_spam_scanning.py class EICAR (line 46) | class EICAR(garak.probes.Probe): method __init__ (line 68) | def __init__(self, config_root=_config): class GTUBE (line 74) | class GTUBE(garak.probes.Probe): method __init__ (line 95) | def __init__(self, config_root=_config): class GTphish (line 101) | class GTphish(garak.probes.Probe): method __init__ (line 123) | def __init__(self, config_root=_config): FILE: garak/probes/badchars.py class _Swap (line 34) | class _Swap: function _render_swaps (line 41) | def _render_swaps(elements: Sequence) -> str: function _load_homoglyph_map (line 77) | def _load_homoglyph_map() -> dict[str, List[str]]: class BadCharacters (line 111) | class BadCharacters(garak.probes.Probe): method __init__ (line 146) | def __init__(self, config_root=_config): method _append_prompt (line 207) | def _append_prompt(self, text: str, metadata: dict) -> None: method _generate_variants (line 222) | def _generate_variants( method _generate_invisible_variants (line 239) | def _generate_invisible_variants(self, payload: str) -> Iterator[Tuple... method _generate_homoglyph_variants (line 255) | def _generate_homoglyph_variants(self, payload: str) -> Iterator[Tuple... method _generate_reordering_variants (line 281) | def _generate_reordering_variants(self, payload: str) -> Iterator[Tupl... method _generate_deletion_variants (line 298) | def _generate_deletion_variants(self, payload: str) -> Iterator[Tuple[... method _inject_sequences (line 318) | def _inject_sequences(self, payload: str, insertions: List[Tuple[int, ... method _apply_swaps (line 327) | def _apply_swaps(self, payload: str, indices: Sequence[int]) -> str: method _non_overlapping (line 342) | def _non_overlapping(indices: Sequence[int]) -> bool: method _select_positions (line 345) | def _select_positions( method _select_ascii (line 378) | def _select_ascii(limit: int) -> List[str]: method _excerpt (line 386) | def _excerpt(payload: str, limit: int = 96) -> str: method _downsample_prompts (line 392) | def _downsample_prompts(self) -> None: FILE: garak/probes/base.py class Probe (line 30) | class Probe(Configurable): method __init__ (line 68) | def __init__(self, config_root=_config): method _get_langprovider (line 141) | def _get_langprovider(self): method _get_reverse_langprovider (line 147) | def _get_reverse_langprovider(self): method _attempt_prestore_hook (line 153) | def _attempt_prestore_hook( method _generator_precall_hook (line 160) | def _generator_precall_hook(self, generator, attempt=None) -> None: method _buff_hook (line 165) | def _buff_hook( method _postprocess_buff (line 192) | def _postprocess_buff(attempt: garak.attempt.Attempt) -> garak.attempt... method _generator_cleanup (line 200) | def _generator_cleanup(self): method _postprocess_hook (line 204) | def _postprocess_hook( method _mint_attempt (line 210) | def _mint_attempt( method _postprocess_attempt (line 272) | def _postprocess_attempt(self, this_attempt) -> garak.attempt.Attempt: method _execute_attempt (line 299) | def _execute_attempt(self, this_attempt): method _execute_all (line 311) | def _execute_all(self, attempts) -> Iterable[garak.attempt.Attempt]: method probe (line 370) | def probe(self, generator) -> Iterable[garak.attempt.Attempt]: method _prune_data (line 457) | def _prune_data(self, cap, prune_triggers=False): class TreeSearchProbe (line 468) | class TreeSearchProbe(Probe): method _get_initial_nodes (line 478) | def _get_initial_nodes(self) -> Iterable: method _get_node_id (line 482) | def _get_node_id(self, node) -> str: method _get_node_children (line 486) | def _get_node_children(self, node) -> Iterable: method _get_node_terms (line 490) | def _get_node_terms(self, node) -> Iterable[str]: method _gen_prompts (line 494) | def _gen_prompts(self, term: str) -> Iterable[str]: method _get_node_parent (line 498) | def _get_node_parent(self, node): method _get_node_siblings (line 502) | def _get_node_siblings(self, node) -> Iterable: method probe (line 506) | def probe(self, generator): method __init__ (line 668) | def __init__(self, config_root=_config): class IterativeProbe (line 677) | class IterativeProbe(Probe): method __init__ (line 702) | def __init__(self, config_root=_config): method _create_attempt (line 708) | def _create_attempt(self, prompt) -> garak.attempt.Attempt: method _create_init_attempts (line 762) | def _create_init_attempts(self) -> Iterable[garak.attempt.Attempt]: method _generate_next_attempts (line 766) | def _generate_next_attempts( method probe (line 772) | def probe(self, generator): method _postprocess_attempt (line 820) | def _postprocess_attempt(self, this_attempt) -> garak.attempt.Attempt: FILE: garak/probes/continuation.py class ContinueSlursReclaimedSlursFull (line 22) | class ContinueSlursReclaimedSlursFull(garak.probes.Probe): method __init__ (line 47) | def __init__(self, config_root=_config): method _attempt_prestore_hook (line 95) | def _attempt_prestore_hook(self, attempt: Attempt, seq: int) -> Attempt: class ContinueSlursReclaimedSlurs (line 103) | class ContinueSlursReclaimedSlurs(ContinueSlursReclaimedSlursFull, garak... FILE: garak/probes/dan.py class DANProbeMeta (line 28) | class DANProbeMeta(type): method __new__ (line 54) | def __new__(cls, name, bases, attrs, **kwargs): method __init__ (line 111) | def __init__(cls, name, bases, attrs, **kwargs): class Dan_11_0 (line 152) | class Dan_11_0( class Dan_10_0 (line 163) | class Dan_10_0( class Dan_9_0 (line 172) | class Dan_9_0( class Dan_8_0 (line 181) | class Dan_8_0( class Dan_7_0 (line 190) | class Dan_7_0( class Dan_6_2 (line 199) | class Dan_6_2( class Dan_6_0 (line 208) | class Dan_6_0( class DUDE (line 217) | class DUDE( class STAN (line 229) | class STAN( class DAN_Jailbreak (line 241) | class DAN_Jailbreak( class AntiDAN (line 253) | class AntiDAN( class ChatGPT_Developer_Mode_v2 (line 265) | class ChatGPT_Developer_Mode_v2( class ChatGPT_Developer_Mode_RANTI (line 278) | class ChatGPT_Developer_Mode_RANTI( class ChatGPT_Image_Markdown (line 291) | class ChatGPT_Image_Markdown( class Ablation_Dan_11_0 (line 303) | class Ablation_Dan_11_0( method __init__ (line 316) | def __init__(self, config_root=_config): class AutoDANCached (line 342) | class AutoDANCached( class AutoDAN (line 357) | class AutoDAN( method __init__ (line 385) | def __init__(self, config_root=_config): method probe (line 389) | def probe(self, generator) -> Iterable[garak.attempt.Attempt]: class DanInTheWildFull (line 435) | class DanInTheWildFull( class DanInTheWild (line 454) | class DanInTheWild(DanInTheWildFull): method __init__ (line 464) | def __init__(self, config_root=_config): FILE: garak/probes/divergence.py class Repeat (line 18) | class Repeat(garak.probes.Probe): method __init__ (line 54) | def __init__(self, config_root=_config): method _attempt_prestore_hook (line 73) | def _attempt_prestore_hook(self, attempt: Attempt, seq: int) -> Attempt: method _generator_precall_hook (line 77) | def _generator_precall_hook(self, generator, attempt=None): method _postprocess_hook (line 83) | def _postprocess_hook(self, attempt) -> Attempt: class RepeatExtended (line 89) | class RepeatExtended(Repeat): class RepeatedToken (line 208) | class RepeatedToken(garak.probes.Probe): method __init__ (line 241) | def __init__(self, config_root=_config): method _roundtrip_tokens (line 286) | def _roundtrip_tokens( method _get_token_strings (line 291) | def _get_token_strings(self, sort: bool = True) -> list[str]: FILE: garak/probes/doctor.py class Puppetry (line 21) | class Puppetry(garak.probes.Probe): method __init__ (line 48) | def __init__(self, config_root=_config): class Bypass (line 79) | class Bypass(garak.probes.Probe): method _build_prompts (line 98) | def _build_prompts(self): method __init__ (line 107) | def __init__(self, config_root=_config): class BypassLeet (line 172) | class BypassLeet(Bypass): method __init__ (line 183) | def __init__(self, config_root=_config): FILE: garak/probes/donotanswer.py function load_local_data (line 27) | def load_local_data(self): function local_constructor (line 36) | def local_constructor(self, config_root=_config): FILE: garak/probes/dra.py class DRA (line 66) | class DRA(garak.probes.Probe): method __init__ (line 110) | def __init__(self, config_root=_config): method _prefix_gen (line 147) | def _prefix_gen(self, question) -> str: method _check_moderation (line 167) | def _check_moderation(self, token) -> bool: method _suffix_gen (line 179) | def _suffix_gen(self, question, template) -> str: method _generate_prompts (line 239) | def _generate_prompts(self) -> List[str]: class DRAAdvanced (line 265) | class DRAAdvanced(DRA): method __init__ (line 279) | def __init__(self, config_root=_config): method _check_moderation (line 287) | def _check_moderation(self, token) -> bool: method _generate_prompts (line 319) | def _generate_prompts(self) -> List[str]: FILE: garak/probes/encoding.py function rot13 (line 56) | def rot13(text): function braille (line 60) | def braille(text): function morse (line 141) | def morse(text): class EncodingMixin (line 192) | class EncodingMixin: method _load_payloads (line 217) | def _load_payloads(self): method _generate_encoded_prompts (line 236) | def _generate_encoded_prompts(self, encoding_funcs, encoding_name): method __init__ (line 254) | def __init__(self): method _attempt_prestore_hook (line 270) | def _attempt_prestore_hook(self, attempt, seq): class InjectBase64 (line 275) | class InjectBase64(EncodingMixin, garak.probes.Probe): method __init__ (line 292) | def __init__(self, config_root=_config): class InjectBase16 (line 297) | class InjectBase16(EncodingMixin, garak.probes.Probe): method __init__ (line 307) | def __init__(self, config_root=_config): class InjectBase32 (line 312) | class InjectBase32(EncodingMixin, garak.probes.Probe): method __init__ (line 322) | def __init__(self, config_root=_config): class InjectAscii85 (line 327) | class InjectAscii85(EncodingMixin, garak.probes.Probe): method __init__ (line 337) | def __init__(self, config_root=_config): class InjectHex (line 342) | class InjectHex(EncodingMixin, garak.probes.Probe): method __init__ (line 352) | def __init__(self, config_root=_config): class InjectQP (line 357) | class InjectQP(EncodingMixin, garak.probes.Probe): method __init__ (line 369) | def __init__(self, config_root=_config): class InjectUU (line 374) | class InjectUU(EncodingMixin, garak.probes.Probe): method UUencode (line 385) | def UUencode(self, payload): method __init__ (line 392) | def __init__(self, config_root=_config): class InjectMime (line 398) | class InjectMime(EncodingMixin, garak.probes.Probe): method __init__ (line 407) | def __init__(self, config_root=_config): class InjectROT13 (line 415) | class InjectROT13(EncodingMixin, garak.probes.Probe): method __init__ (line 426) | def __init__(self, config_root=_config): class InjectBase2048 (line 431) | class InjectBase2048(EncodingMixin, garak.probes.Probe): method __init__ (line 440) | def __init__(self, config_root=_config): class InjectBraille (line 448) | class InjectBraille(EncodingMixin, garak.probes.Probe): method __init__ (line 459) | def __init__(self, config_root=_config): class InjectAtbash (line 464) | class InjectAtbash(EncodingMixin, garak.probes.Probe): method atbash (line 480) | def atbash(text: bytes) -> bytes: method __init__ (line 493) | def __init__(self, config_root=None): class InjectMorse (line 498) | class InjectMorse(EncodingMixin, garak.probes.Probe): method __init__ (line 509) | def __init__(self, config_root=_config): class InjectNato (line 514) | class InjectNato(EncodingMixin, garak.probes.Probe): method nato (line 522) | def nato(text: bytes) -> bytes: method __init__ (line 562) | def __init__(self, config_root=_config): class InjectEcoji (line 567) | class InjectEcoji(EncodingMixin, garak.probes.Probe): method _ecoji (line 576) | def _ecoji(text: bytes) -> bytes: method __init__ (line 591) | def __init__(self, config_root=_config): class InjectZalgo (line 596) | class InjectZalgo(EncodingMixin, garak.probes.Probe): method zalgo (line 605) | def zalgo(text: bytes) -> bytes: method __init__ (line 617) | def __init__(self, config_root=_config): function leet_bytes (line 622) | def leet_bytes(plain_input: bytes): class InjectLeet (line 626) | class InjectLeet(EncodingMixin, garak.probes.Probe): method __init__ (line 637) | def __init__(self, config_root=_config): class InjectUnicodeTagChars (line 642) | class InjectUnicodeTagChars(EncodingMixin, garak.probes.Probe): method __init__ (line 656) | def __init__(self, config_root=_config): method _tag_char_smuggling (line 662) | def _tag_char_smuggling(self, text: str) -> str: class InjectUnicodeVariantSelectors (line 669) | class InjectUnicodeVariantSelectors(EncodingMixin, garak.probes.Probe): method __init__ (line 683) | def __init__(self, config_root=_config): class InjectSneakyBits (line 688) | class InjectSneakyBits(EncodingMixin, garak.probes.Probe): method __init__ (line 704) | def __init__(self, config_root=_config): FILE: garak/probes/exploitation.py class JinjaTemplatePythonInjection (line 36) | class JinjaTemplatePythonInjection(garak.probes.Probe): method __init__ (line 72) | def __init__(self, config_root=_config): class SQLInjectionSystem (line 81) | class SQLInjectionSystem(garak.probes.Probe): method __init__ (line 116) | def __init__(self, config_root=_config): class SQLInjectionEcho (line 125) | class SQLInjectionEcho(garak.probes.Probe): method __init__ (line 154) | def __init__(self, config_root=_config): FILE: garak/probes/fileformats.py class HF_Files (line 25) | class HF_Files(garak.probes.Probe): method __init__ (line 53) | def __init__(self, config_root=_config): method probe (line 57) | def probe(self, generator) -> Iterable[garak.attempt.Attempt]: FILE: garak/probes/fitd.py class FITD (line 29) | class FITD(garak.probes.IterativeProbe): method __init__ (line 61) | def __init__(self, config_root=_config): method _load_red_team_prompt_templates (line 74) | def _load_red_team_prompt_templates(self): method set_up_attack_gen_llm (line 104) | def set_up_attack_gen_llm(self): method set_up_detector (line 124) | def set_up_detector(self): method set_up_refusal_detector (line 128) | def set_up_refusal_detector(self): method _get_red_team_response (line 134) | def _get_red_team_response(self, prompt: str) -> str: method _is_refusal (line 161) | def _is_refusal(self, response: str) -> bool: method _get_level_queries (line 183) | def _get_level_queries(self, target_turn: str, init_turn: str) -> Iter... method _generate_init_turn (line 215) | def _generate_init_turn(self, target_turn: str, max_tries: int = 3) ->... method _create_init_attempts (line 233) | def _create_init_attempts(self) -> Iterable[garak.attempt.Attempt]: method _verify_is_last_response_success (line 280) | def _verify_is_last_response_success( method _is_response_aligned (line 336) | def _is_response_aligned(self, request: str, response: str) -> bool: method _change_sensitive_words (line 357) | def _change_sensitive_words(self, target_prompt): method generate_next_turn_attempt (line 363) | def generate_next_turn_attempt( method _generate_next_attempts (line 496) | def _generate_next_attempts( method _is_realign_prompt (line 515) | def _is_realign_prompt(self, prompt: str) -> bool: method _should_terminate_conversation (line 523) | def _should_terminate_conversation( FILE: garak/probes/glitch.py class GlitchFull (line 20) | class GlitchFull(garak.probes.Probe): method __init__ (line 194) | def __init__(self, config_root=_config): method _attempt_prestore_hook (line 218) | def _attempt_prestore_hook(self, attempt: Attempt, seq: int) -> Attempt: class Glitch (line 223) | class Glitch(GlitchFull): method __init__ (line 233) | def __init__(self, config_root=_config): FILE: garak/probes/goodside.py class WhoIsRiley (line 19) | class WhoIsRiley(garak.probes.Probe): class ThreatenJSON (line 50) | class ThreatenJSON(garak.probes.Probe): class Davidjl (line 84) | class Davidjl(garak.probes.Probe): method _attempt_prestore_hook (line 118) | def _attempt_prestore_hook(self, attempt: Attempt, seq: int) -> Attempt: class Tag (line 123) | class Tag(garak.probes.Probe): method _tag_encode_thacker (line 151) | def _tag_encode_thacker(self, payload): method _convert_json_string (line 156) | def _convert_json_string(self, json_string): method _translate_descr (line 168) | def _translate_descr(self, attempt_descrs: List[str]) -> List[str]: method __init__ (line 205) | def __init__(self, config_root=_config): method _attempt_prestore_hook (line 270) | def _attempt_prestore_hook(self, attempt: Attempt, seq: int) -> Attempt: FILE: garak/probes/grandma.py class Win10 (line 43) | class Win10(garak.probes.Probe): method __init__ (line 63) | def __init__(self, config_root=_config): class Win11 (line 73) | class Win11(Win10): class Slurs (line 82) | class Slurs(garak.probes.Probe): method __init__ (line 107) | def __init__(self, config_root=_config): class Substances (line 116) | class Substances(garak.probes.Probe): method __init__ (line 144) | def __init__(self, config_root=_config): FILE: garak/probes/latentinjection.py class LatentInjectionMixin (line 28) | class LatentInjectionMixin: method _build_prompts_triggers (line 41) | def _build_prompts_triggers(self, cap=None) -> None: method _attempt_prestore_hook (line 95) | def _attempt_prestore_hook(self, attempt: Attempt, seq: int) -> Attempt: class NonFullMixin (line 100) | class NonFullMixin: class TranslationMixin (line 106) | class TranslationMixin: method __init__ (line 131) | def __init__(self): class FactSnippetMixin (line 144) | class FactSnippetMixin: method _build_snippet_contexts (line 171) | def _build_snippet_contexts(self): method __init__ (line 205) | def __init__(self): class LatentInjectionTranslationEnFrFull (line 214) | class LatentInjectionTranslationEnFrFull( method __init__ (line 225) | def __init__(self, config_root=_config): class LatentInjectionTranslationEnZhFull (line 230) | class LatentInjectionTranslationEnZhFull( method __init__ (line 243) | def __init__(self, config_root=_config): class LatentInjectionReportFull (line 248) | class LatentInjectionReportFull(LatentInjectionMixin, garak.probes.Probe): method __init__ (line 380) | def __init__(self, config_root=_config): class LatentInjectionResumeFull (line 386) | class LatentInjectionResumeFull(LatentInjectionMixin, garak.probes.Probe): method __init__ (line 490) | def __init__(self, config_root=_config): class LatentInjectionFactSnippetEiffelFull (line 495) | class LatentInjectionFactSnippetEiffelFull( method __init__ (line 526) | def __init__(self, config_root=_config): class LatentInjectionFactSnippetLegalFull (line 532) | class LatentInjectionFactSnippetLegalFull( method __init__ (line 560) | def __init__(self, config_root=_config): class LatentJailbreakFull (line 566) | class LatentJailbreakFull(LatentInjectionMixin, garak.probes.Probe): method __init__ (line 628) | def __init__(self, config_root=_config): class LatentWhois (line 633) | class LatentWhois(LatentInjectionMixin, garak.probes.Probe): method __init__ (line 667) | def __init__(self, config_root=_config): class LatentWhoisSnippetFull (line 672) | class LatentWhoisSnippetFull(FactSnippetMixin, LatentWhois): method __init__ (line 705) | def __init__(self, config_root=_config): class LatentWhoisSnippet (line 711) | class LatentWhoisSnippet(NonFullMixin, LatentWhoisSnippetFull): class LatentInjectionFactSnippetLegal (line 715) | class LatentInjectionFactSnippetLegal( class LatentInjectionReport (line 721) | class LatentInjectionReport(NonFullMixin, LatentInjectionReportFull): class LatentInjectionFactSnippetEiffel (line 725) | class LatentInjectionFactSnippetEiffel( class LatentInjectionResume (line 733) | class LatentInjectionResume(NonFullMixin, LatentInjectionResumeFull): class LatentInjectionTranslationEnFr (line 737) | class LatentInjectionTranslationEnFr(NonFullMixin, LatentInjectionTransl... class LatentInjectionTranslationEnZh (line 741) | class LatentInjectionTranslationEnZh(NonFullMixin, LatentInjectionTransl... class LatentJailbreak (line 745) | class LatentJailbreak(NonFullMixin, LatentJailbreakFull): FILE: garak/probes/leakreplay.py class ClozeProbeMixin (line 27) | class ClozeProbeMixin: method __init__ (line 45) | def __init__(self, config_root=_config): method _attempt_prestore_hook (line 83) | def _attempt_prestore_hook(self, attempt: Attempt, seq: int) -> Attempt: method _postprocess_hook (line 87) | def _postprocess_hook(self, attempt: Attempt) -> Attempt: class CompleteProbeMixin (line 96) | class CompleteProbeMixin: method __init__ (line 114) | def __init__(self, config_root=_config): method _attempt_prestore_hook (line 131) | def _attempt_prestore_hook(self, attempt: Attempt, seq: int) -> Attempt: class NonFullMixin (line 136) | class NonFullMixin: class LiteratureClozeFull (line 147) | class LiteratureClozeFull(ClozeProbeMixin, garak.probes.Probe): class LiteratureCloze (line 156) | class LiteratureCloze(NonFullMixin, LiteratureClozeFull): class LiteratureCompleteFull (line 163) | class LiteratureCompleteFull(CompleteProbeMixin, garak.probes.Probe): class LiteratureComplete (line 173) | class LiteratureComplete(NonFullMixin, LiteratureCompleteFull): class NYTClozeFull (line 181) | class NYTClozeFull(ClozeProbeMixin, garak.probes.Probe): class NYTCloze (line 190) | class NYTCloze(NonFullMixin, NYTClozeFull): class NYTCompleteFull (line 197) | class NYTCompleteFull(CompleteProbeMixin, garak.probes.Probe): class NYTComplete (line 206) | class NYTComplete(NonFullMixin, NYTCompleteFull): class GuardianClozeFull (line 214) | class GuardianClozeFull(ClozeProbeMixin, garak.probes.Probe): class GuardianCloze (line 223) | class GuardianCloze(NonFullMixin, GuardianClozeFull): class GuardianCompleteFull (line 230) | class GuardianCompleteFull(CompleteProbeMixin, garak.probes.Probe): class GuardianComplete (line 239) | class GuardianComplete(NonFullMixin, GuardianCompleteFull): class PotterClozeFull (line 247) | class PotterClozeFull(ClozeProbeMixin, garak.probes.Probe): class PotterCloze (line 256) | class PotterCloze(NonFullMixin, PotterClozeFull): class PotterCompleteFull (line 263) | class PotterCompleteFull(CompleteProbeMixin, garak.probes.Probe): class PotterComplete (line 272) | class PotterComplete(NonFullMixin, PotterCompleteFull): FILE: garak/probes/lmrc.py class Anthropomorphisation (line 26) | class Anthropomorphisation(garak.probes.Probe): class Bullying (line 51) | class Bullying(garak.probes.Probe): class Deadnaming (line 81) | class Deadnaming(garak.probes.Probe): method _attempt_prestore_hook (line 116) | def _attempt_prestore_hook(self, attempt: garak.attempt, seq) -> garak... class SexualContent (line 121) | class SexualContent(garak.probes.Probe): class Sexualisation (line 150) | class Sexualisation(garak.probes.Probe): class SlurUsage (line 184) | class SlurUsage(garak.probes.Probe): class Profanity (line 211) | class Profanity(garak.probes.Probe): class QuackMedicine (line 249) | class QuackMedicine(garak.probes.Probe): FILE: garak/probes/malwaregen.py class TopLevel (line 27) | class TopLevel(garak.probes.Probe): method __init__ (line 48) | def __init__(self, config_root=_config): class SubFunctions (line 57) | class SubFunctions(garak.probes.Probe): method _attempt_prestore_hook (line 83) | def _attempt_prestore_hook( method __init__ (line 88) | def __init__(self, config_root=_config): class Evasion (line 99) | class Evasion(garak.probes.Probe): method __init__ (line 124) | def __init__(self, config_root=_config): class Payload (line 133) | class Payload(garak.probes.Probe): method __init__ (line 167) | def __init__(self, config_root=_config): FILE: garak/probes/misleading.py class FalseAssertion (line 18) | class FalseAssertion(garak.probes.Probe): method __init__ (line 43) | def __init__(self, config_root=_config): FILE: garak/probes/packagehallucination.py class PackageHallucinationProbe (line 63) | class PackageHallucinationProbe(garak.probes.Probe, ABC): method language_name (line 87) | def language_name(self) -> str: method __init__ (line 91) | def __init__(self, config_root=_config): class Python (line 105) | class Python(PackageHallucinationProbe): class Ruby (line 121) | class Ruby(PackageHallucinationProbe): class JavaScript (line 137) | class JavaScript(PackageHallucinationProbe): class Rust (line 153) | class Rust(PackageHallucinationProbe): class RakuLand (line 170) | class RakuLand(PackageHallucinationProbe): class Perl (line 186) | class Perl(PackageHallucinationProbe): class Dart (line 202) | class Dart(PackageHallucinationProbe): FILE: garak/probes/phrasing.py class PastTenseFull (line 15) | class PastTenseFull(garak.probes.Probe): method __init__ (line 33) | def __init__(self, config_root=_config): class PastTense (line 47) | class PastTense(PastTenseFull): method __init__ (line 56) | def __init__(self, config_root=_config): class FutureTenseFull (line 61) | class FutureTenseFull(garak.probes.Probe): method __init__ (line 80) | def __init__(self, config_root=_config): class FutureTense (line 94) | class FutureTense(FutureTenseFull): method __init__ (line 103) | def __init__(self, config_root=_config): FILE: garak/probes/promptinject.py function constructor (line 35) | def constructor(self, config_root=_config): function load_data_all_attacks (line 52) | def load_data_all_attacks(self, prompt_data): function _attempt_prestore_hook (line 88) | def _attempt_prestore_hook(self, attempt: Attempt, seq: int) -> Attempt: function _generator_precall_hook (line 96) | def _generator_precall_hook(self, generator, attempt): FILE: garak/probes/realtoxicityprompts.py function load_local_data (line 39) | def load_local_data(self): function local_constructor (line 43) | def local_constructor(self, config_root=_config): class RTPBlank (line 48) | class RTPBlank(garak.probes.Probe): FILE: garak/probes/sata.py function _nltk_mask_payloads (line 32) | def _nltk_mask_payloads(payloads: list, n: int = 2) -> list: class MLM (line 104) | class MLM(garak.probes.Probe): method __init__ (line 150) | def __init__(self, config_root=_config): FILE: garak/probes/smuggling.py class HypotheticalResponse (line 22) | class HypotheticalResponse(garak.probes.Probe): class FunctionMasking (line 48) | class FunctionMasking(garak.probes.Probe): FILE: garak/probes/snowball.py class GraphConnectivityFull (line 21) | class GraphConnectivityFull(garak.probes.Probe): method __init__ (line 40) | def __init__(self, config_root=_config): class GraphConnectivity (line 50) | class GraphConnectivity(GraphConnectivityFull, garak.probes.Probe): method __init__ (line 54) | def __init__(self, config_root=_config): class PrimesFull (line 59) | class PrimesFull(garak.probes.Probe): method __init__ (line 78) | def __init__(self, config_root=_config): class Primes (line 89) | class Primes(PrimesFull, garak.probes.Probe): method __init__ (line 93) | def __init__(self, config_root=_config): class SenatorsFull (line 98) | class SenatorsFull(garak.probes.Probe): method __init__ (line 118) | def __init__(self, config_root=_config): class Senators (line 128) | class Senators(SenatorsFull, garak.probes.Probe): method __init__ (line 132) | def __init__(self, config_root=_config): FILE: garak/probes/suffix.py class GCGCached (line 22) | class GCGCached(garak.probes.Probe): class GCG (line 55) | class GCG(garak.probes.Probe): method __init__ (line 97) | def __init__(self, goal: str = GOAL, config_root=_config): method probe (line 104) | def probe(self, generator) -> List[garak.attempt.Attempt]: class BEAST (line 170) | class BEAST(garak.probes.Probe): method __init__ (line 192) | def __init__(self, goal: str = GOAL, config_root=_config): method probe (line 199) | def probe(self, generator) -> List[garak.attempt.Attempt]: FILE: garak/probes/tap.py class TAPCached (line 65) | class TAPCached(garak.probes.Probe): method __init__ (line 88) | def __init__(self, config_root=_config): class TAP (line 104) | class TAP(garak.probes.Probe): method __init__ (line 144) | def __init__(self, config_root=_config): method probe (line 158) | def probe(self, generator) -> List[garak.attempt.Attempt]: class PAIR (line 243) | class PAIR(garak.probes.Probe): method __init__ (line 282) | def __init__(self, config_root=_config): method probe (line 286) | def probe(self, generator) -> List[garak.attempt.Attempt]: FILE: garak/probes/test.py class Blank (line 9) | class Blank(garak.probes.Probe): class Test (line 25) | class Test(garak.probes.Probe): FILE: garak/probes/topic.py class WordnetBlockedWords (line 24) | class WordnetBlockedWords(garak.probes.TreeSearchProbe): method _get_initial_nodes (line 55) | def _get_initial_nodes(self): method _get_node_terms (line 70) | def _get_node_terms(self, node): method _get_node_children (line 75) | def _get_node_children(self, node): method _get_node_parent (line 78) | def _get_node_parent(self, node): method _get_node_siblings (line 85) | def _get_node_siblings(self, node) -> Iterable: method _get_node_id (line 90) | def _get_node_id(self, node): method _gen_prompts (line 93) | def _gen_prompts(self, term): method __init__ (line 98) | def __init__(self, config_root=_config): class WordnetAllowedWords (line 120) | class WordnetAllowedWords(WordnetBlockedWords): method _get_initial_nodes (line 140) | def _get_initial_nodes(self): class WordnetControversial (line 170) | class WordnetControversial(WordnetBlockedWords): FILE: garak/probes/visual_jailbreak.py class FigStepFull (line 32) | class FigStepFull(garak.probes.Probe): method _load_SafeBench (line 64) | def _load_SafeBench(self): method __init__ (line 98) | def __init__(self, config_root=_config): method probe (line 121) | def probe(self, generator): class FigStep (line 128) | class FigStep(FigStepFull, garak.probes.Probe): method probe (line 139) | def probe(self, generator): FILE: garak/probes/web_injection.py class MarkdownImageExfil (line 35) | class MarkdownImageExfil(garak.probes.Probe): method __init__ (line 79) | def __init__(self, config_root=_config): method _attempt_prestore_hook (line 90) | def _attempt_prestore_hook( class ColabAIDataLeakage (line 101) | class ColabAIDataLeakage(garak.probes.Probe): method __init__ (line 135) | def __init__(self, config_root=_config): method mutate_domain (line 145) | def mutate_domain(domain: str) -> str: class StringAssemblyDataExfil (line 162) | class StringAssemblyDataExfil(garak.probes.Probe): method __init__ (line 186) | def __init__(self, config_root=_config): class PlaygroundMarkdownExfil (line 213) | class PlaygroundMarkdownExfil(garak.probes.Probe): method __init__ (line 242) | def __init__(self, config_root=_config): method _attempt_prestore_hook (line 248) | def _attempt_prestore_hook( class MarkdownExfilMixin (line 259) | class MarkdownExfilMixin: method __init__ (line 266) | def __init__(self, config_root=_config): method generate_prompts (line 303) | def generate_prompts(self, markdown_templates, num_prompts): class MarkdownURINonImageExfilExtended (line 351) | class MarkdownURINonImageExfilExtended(MarkdownExfilMixin, garak.probes.... method __init__ (line 395) | def __init__(self, config_root=_config): class MarkdownURIImageExfilExtended (line 401) | class MarkdownURIImageExfilExtended(MarkdownExfilMixin, garak.probes.Pro... method __init__ (line 444) | def __init__(self, config_root=_config): class TaskXSS (line 450) | class TaskXSS(garak.probes.Probe): method __init__ (line 481) | def __init__(self, config_root=_config): method _generate_prompts (line 487) | def _generate_prompts(self): class MarkdownXSS (line 505) | class MarkdownXSS(garak.probes.Probe): method __init__ (line 533) | def __init__(self, config_root=_config): method _generate_prompts (line 537) | def _generate_prompts(self): FILE: garak/report.py class Report (line 15) | class Report: method __init__ (line 32) | def __init__( method load (line 49) | def load(self): method get_evaluations (line 57) | def get_evaluations(self): method export (line 87) | def export(self): # TODO: add html format FILE: garak/resources/api/huggingface.py class HFCompatible (line 11) | class HFCompatible: method _set_hf_context_len (line 15) | def _set_hf_context_len(self, config): method _gather_hf_params (line 20) | def _gather_hf_params(self, hf_constructor: Callable): method _gather_generation_params (line 90) | def _gather_generation_params(self): method _select_hf_device (line 99) | def _select_hf_device(self): FILE: garak/resources/api/nltk.py function _nltk_data (line 13) | def _nltk_data(): function download (line 33) | def download( FILE: garak/resources/apikey/serviceutils.py function extract_key_types (line 4) | def extract_key_types(regex_dict_list: List[Dict[str, Any]]) -> List[str]: FILE: garak/resources/autodan/autodan.py function autodan_generate (line 78) | def autodan_generate( FILE: garak/resources/autodan/genetic.py function autodan_ga (line 61) | def autodan_ga( function autodan_hga (line 120) | def autodan_hga( function roulette_wheel_selection (line 172) | def roulette_wheel_selection( function apply_crossover_and_mutation (line 200) | def apply_crossover_and_mutation( function crossover (line 242) | def crossover(str1: str, str2: str, num_points: int) -> Tuple[str, str]: function gpt_mutate (line 288) | def gpt_mutate(mutation_generator: garak.generators.Generator, sentence:... function apply_gpt_mutation (line 341) | def apply_gpt_mutation( function replace_with_synonyms (line 375) | def replace_with_synonyms(sentence: str, num: int = 10) -> str: function construct_momentum_word_dict (line 401) | def construct_momentum_word_dict( function get_synonyms (line 447) | def get_synonyms(word: str) -> list: function word_roulette_wheel_selection (line 463) | def word_roulette_wheel_selection(word: str, word_scores: dict) -> str: function replace_with_best_synonym (line 484) | def replace_with_best_synonym( function apply_word_replacement (line 510) | def apply_word_replacement( function join_words_with_punctuation (line 529) | def join_words_with_punctuation(words: list) -> str: function get_score_autodan (line 547) | def get_score_autodan( FILE: garak/resources/autodan/model_utils.py function forward (line 15) | def forward( function check_for_attack_success (line 50) | def check_for_attack_success(gen_str: str, test_prefixes) -> bool: class AutoDanPrefixManager (line 66) | class AutoDanPrefixManager: method __init__ (line 67) | def __init__( method _reset_messages (line 102) | def _reset_messages(self): method get_input_ids (line 108) | def get_input_ids( FILE: garak/resources/beast/beast_attack.py function _format_chat (line 24) | def _format_chat(generator: Generator, prompt: str): function _evaluate (line 34) | def _evaluate(generator, prompt, candidate): function _evaluate_target (line 43) | def _evaluate_target(generator, prompt, candidate, target): function _get_perplexity (line 56) | def _get_perplexity( function _score_candidates (line 107) | def _score_candidates( function _check_jailbreak (line 158) | def _check_jailbreak(outputs: list[str]) -> bool: function _sample_tokens (line 175) | def _sample_tokens( function _get_best_candidate (line 209) | def _get_best_candidate( function _attack (line 266) | def _attack( function run_beast (line 338) | def run_beast( FILE: garak/resources/common.py function load_advbench (line 47) | def load_advbench(size: int = 0) -> pd.DataFrame: FILE: garak/resources/encodings.py function leetspeak (line 12) | def leetspeak(input: str, transmute_chance: float = 0.6) -> str: FILE: garak/resources/fixer/20240628_gcg_rename.py class RenameGCG (line 8) | class RenameGCG(Migration): method apply (line 9) | def apply(config_dict: dict) -> dict: FILE: garak/resources/fixer/20240801_continuation_rename.py class RenameContinuation (line 8) | class RenameContinuation(Migration): method apply (line 9) | def apply(config_dict: dict) -> dict: FILE: garak/resources/fixer/20240822_knownbadsignatures_rename.py class RenameKnownbadsignatures (line 8) | class RenameKnownbadsignatures(Migration): method apply (line 9) | def apply(config_dict: dict) -> dict: FILE: garak/resources/fixer/20241011_replay_rename.py class RenameReplay (line 8) | class RenameReplay(Migration): method apply (line 9) | def apply(config_dict: dict) -> dict: FILE: garak/resources/fixer/20250220_unsafe_content_rename.py class RenameRiskywords (line 8) | class RenameRiskywords(Migration): method apply (line 9) | def apply(config_dict: dict) -> dict: class RenameToxicity (line 18) | class RenameToxicity(Migration): method apply (line 19) | def apply(config_dict: dict) -> dict: FILE: garak/resources/fixer/20250224_lightweight_probe_defaults.py class RenameFigstep (line 8) | class RenameFigstep(Migration): method apply (line 9) | def apply(config_dict: dict) -> dict: class RenameGraphConn (line 23) | class RenameGraphConn(Migration): method apply (line 24) | def apply(config_dict: dict) -> dict: class RenamePrimes (line 38) | class RenamePrimes(Migration): method apply (line 39) | def apply(config_dict: dict) -> dict: class RenameSenators (line 53) | class RenameSenators(Migration): method apply (line 54) | def apply(config_dict: dict) -> dict: class RenameHijackHateHumans (line 68) | class RenameHijackHateHumans(Migration): method apply (line 69) | def apply(config_dict: dict) -> dict: class RenameHijackKillHumans (line 83) | class RenameHijackKillHumans(Migration): method apply (line 84) | def apply(config_dict: dict) -> dict: class RenameHijackLongPrompt (line 100) | class RenameHijackLongPrompt(Migration): method apply (line 101) | def apply(config_dict: dict) -> dict: class RenamePastTense (line 115) | class RenamePastTense(Migration): method apply (line 116) | def apply(config_dict: dict) -> dict: class RenameFutureTense (line 130) | class RenameFutureTense(Migration): method apply (line 131) | def apply(config_dict: dict) -> dict: class RenameLiteratureCloze (line 145) | class RenameLiteratureCloze(Migration): method apply (line 146) | def apply(config_dict: dict) -> dict: class RenameLiteratureComplete (line 160) | class RenameLiteratureComplete(Migration): method apply (line 161) | def apply(config_dict: dict) -> dict: class RenameLatentJailbreak (line 175) | class RenameLatentJailbreak(Migration): method apply (line 176) | def apply(config_dict: dict) -> dict: class RenameLatentInjectionFactSnippetEiffel (line 191) | class RenameLatentInjectionFactSnippetEiffel(Migration): method apply (line 192) | def apply(config_dict: dict) -> dict: class RenameDanInTheWild (line 213) | class RenameDanInTheWild(Migration): method apply (line 214) | def apply(config_dict: dict) -> dict: class RenameContinueSlursReclaimedSlurs (line 228) | class RenameContinueSlursReclaimedSlurs(Migration): method apply (line 229) | def apply(config_dict: dict) -> dict: class RenameFalseAssertion (line 243) | class RenameFalseAssertion(Migration): method apply (line 244) | def apply(config_dict: dict) -> dict: class RenameGlitch (line 253) | class RenameGlitch(Migration): method apply (line 254) | def apply(config_dict: dict) -> dict: FILE: garak/resources/fixer/20250908_xss_rename.py class RenameXSS (line 8) | class RenameXSS(Migration): method apply (line 9) | def apply(config_dict: dict) -> dict: FILE: garak/resources/fixer/20250925_model_target_nametype.py class RenameModelType (line 8) | class RenameModelType(Migration): method apply (line 9) | def apply(config_dict: dict) -> dict: class RenameModelName (line 16) | class RenameModelName(Migration): method apply (line 17) | def apply(config_dict: dict) -> dict: FILE: garak/resources/fixer/20260223_templateinjection_rename.py class RenameTemplateInjection (line 7) | class RenameTemplateInjection(Migration): method apply (line 8) | def apply(config_dict: dict) -> dict: FILE: garak/resources/fixer/__init__.py class Migration (line 16) | class Migration: method apply (line 19) | def apply(config_dict: dict) -> dict: function migrate (line 45) | def migrate(original_config: dict) -> dict: FILE: garak/resources/fixer/_plugin.py function rename (line 12) | def rename(config: dict, path: list[str], old: str, new: str): FILE: garak/resources/gcg/attack_manager.py function get_nonascii_toks (line 43) | def get_nonascii_toks(tokenizer, device="cpu"): function sample_ids_from_grad (line 64) | def sample_ids_from_grad( class AttackPrompt (line 114) | class AttackPrompt: method __init__ (line 117) | def __init__( method _reset_messages (line 182) | def _reset_messages(self): method _gcg_loss (line 188) | def _gcg_loss( method _update_ids (line 231) | def _update_ids(self): method filter_ids (line 264) | def filter_ids(self, ids: torch.Tensor): method generate (line 296) | def generate(self) -> torch.Tensor: method generate_str (line 308) | def generate_str(self) -> str: method test (line 311) | def test(self) -> bool: method grad (line 337) | def grad(self, optim_ids: torch.Tensor) -> torch.Tensor: method step (line 370) | def step( method run (line 417) | def run( class GCGAttack (line 489) | class GCGAttack: method __init__ (line 492) | def __init__( method build_prompts (line 551) | def build_prompts( method run (line 573) | def run( function get_goals_and_targets (line 646) | def get_goals_and_targets( FILE: garak/resources/gcg/generate_gcg.py function run_gcg (line 20) | def run_gcg( FILE: garak/resources/promptinject/_utils.py function hash_str (line 8) | def hash_str(string): function hash_dict (line 12) | def hash_dict(d): class DeepDict (line 16) | class DeepDict(dict): method __missing__ (line 17) | def __missing__(self, key): method __getitem__ (line 21) | def __getitem__(self, key): FILE: garak/resources/promptinject/prompting.py function _get_first_valid (line 27) | def _get_first_valid(*values): function _compile_prompts (line 34) | def _compile_prompts(prompt_dicts, current_product): function _join_main_prompt (line 125) | def _join_main_prompt(preset): function _join_prompt_attack (line 161) | def _join_prompt_attack(preset): function _build_product_list (line 183) | def _build_product_list(products, prompts): function _product_from_iterables (line 207) | def _product_from_iterables(prompt_dicts): function _merge_current_products (line 216) | def _merge_current_products(products): function _build_base_prompt (line 224) | def _build_base_prompt(preset): function _build_attack_prompt (line 235) | def _build_attack_prompt(preset): function _build_config_settings (line 251) | def _build_config_settings(preset): function build_prompts (line 264) | def build_prompts(preset): FILE: garak/resources/red_team/conversation.py function random_string (line 35) | def random_string(n): function extract_json (line 39) | def extract_json(s: str) -> tuple[dict, str]: function get_init_msg (line 133) | def get_init_msg(goal, target): function process_target_response (line 137) | def process_target_response(target_response, score, goal): function clean_attacks_and_convs (line 143) | def clean_attacks_and_convs(attack_list, convs_list): function prune (line 158) | def prune( FILE: garak/resources/red_team/evaluation.py function get_evaluator_prompt (line 11) | def get_evaluator_prompt(attack_prompt, target_response): function get_evaluator_prompt_on_topic (line 16) | def get_evaluator_prompt_on_topic(attack_prompt): function process_output_judge_score (line 22) | def process_output_judge_score(raw_output) -> float: function process_output_on_topic_score (line 34) | def process_output_on_topic_score(raw_output) -> float: function token_count (line 46) | def token_count(string: str, model_name: str) -> int: function get_token_limit (line 52) | def get_token_limit(model_name: str) -> int: class EvaluationJudge (line 59) | class EvaluationJudge: method _create_conv (line 73) | def _create_conv(self, full_prompt, system_prompt=None) -> list[dict]: method judge_score (line 113) | def judge_score(self, attack_prompt_list, target_response_list) -> lis... method on_topic_score (line 124) | def on_topic_score(self, attempt_list) -> list[float]: FILE: garak/resources/red_team/system_prompts.py function attacker_system_prompt (line 26) | def attacker_system_prompt(goal, target_str): function judge_system_prompt (line 75) | def judge_system_prompt(goal): function on_topic_prompt (line 99) | def on_topic_prompt(goal): FILE: garak/resources/smuggling/smuggle_ascii.py function tag_char_smuggling (line 15) | def tag_char_smuggling(payload: str, desired_emoji: str = "😈"): function variant_smuggling (line 33) | def variant_smuggling(payload: str): function sneaky_bits_smuggling (line 50) | def sneaky_bits_smuggling(payload: str): FILE: garak/resources/tap/tap_main.py function load_generator (line 43) | def load_generator( class TAPConversation (line 76) | class TAPConversation: method __init__ (line 79) | def __init__( method add_message (line 95) | def add_message(self, role: str, message: str): method set_system_message (line 98) | def set_system_message(self, message: str): method to_garak_conv (line 107) | def to_garak_conv(self): method update_last_message (line 114) | def update_last_message(self, message: str): class AttackManager (line 118) | class AttackManager(EvaluationJudge): method __init__ (line 119) | def __init__( method get_attack (line 148) | def get_attack(self, convs, prompts): method get_target_response (line 243) | def get_target_response(self, prompts): function run_tap (line 276) | def run_tap( FILE: tests/analyze/test_aggregate.py function test_aggregate_executes (line 15) | def test_aggregate_executes() -> None: FILE: tests/analyze/test_analyze.py function garak_tiny_run (line 16) | def garak_tiny_run() -> None: function test_analyze_log_runs (line 20) | def test_analyze_log_runs(): function test_report_digest_runs (line 37) | def test_report_digest_runs(): function test_analyze_bound_members (line 59) | def test_analyze_bound_members(constant_name): FILE: tests/analyze/test_calibration.py function test_instantiate (line 19) | def test_instantiate(): function test_constructor_with_missing_file (line 33) | def test_constructor_with_missing_file(): function test_lookup (line 47) | def test_lookup(): function test_lookup_absent_probe_detector (line 54) | def test_lookup_absent_probe_detector(): function test_lookup_on_missing_calibration_file (line 60) | def test_lookup_on_missing_calibration_file(): function test_calc_z_score (line 66) | def test_calc_z_score(): function test_comments_written (line 75) | def test_comments_written(defcon): function test_defcon (line 83) | def test_defcon(score): FILE: tests/analyze/test_tbsa.py function test_tbsa_runs (line 62) | def test_tbsa_runs(): function test_tbsa_value (line 66) | def test_tbsa_value(): function test_tbsa_value_t2_OK (line 71) | def test_tbsa_value_t2_OK(): function test_hash_varies (line 80) | def test_hash_varies(): function tbsa_json_filenames (line 101) | def tbsa_json_filenames(request) -> None: function test_stable_hash_different_content (line 118) | def test_stable_hash_different_content(tbsa_json_filenames): function test_tbsa_rounding (line 150) | def test_tbsa_rounding(raw, rounded): FILE: tests/buffs/test_buff_config.py function test_include_original_prompt (line 27) | def test_include_original_prompt(): function test_exclude_original_prompt (line 64) | def test_exclude_original_prompt(): function cleanup (line 90) | def cleanup(request): FILE: tests/buffs/test_buffs.py function test_buff_structure (line 16) | def test_buff_structure(classname): function test_buff_load_and_transform (line 32) | def test_buff_load_and_transform(klassname): FILE: tests/buffs/test_buffs_paraphrase.py function test_buff_results (line 16) | def test_buff_results(klassname): FILE: tests/cli/test_cli.py function test_version_command (line 10) | def test_version_command(capsys): function test_probe_list (line 19) | def test_probe_list(capsys): function test_detector_list (line 29) | def test_detector_list(capsys): function test_generator_list (line 39) | def test_generator_list(capsys): function test_buff_list (line 49) | def test_buff_list(capsys): function test_run_all_active_probes (line 59) | def test_run_all_active_probes(capsys): function test_run_all_active_detectors (line 68) | def test_run_all_active_detectors(capsys): FILE: tests/cli/test_cli_list_filtering.py function _strip_ansi (line 9) | def _strip_ansi(s: str) -> str: function _plugin_lines (line 13) | def _plugin_lines(text: str): function test_list_probes_with_probe_spec (line 31) | def test_list_probes_with_probe_spec(capsys, options): function test_list_probes_with_detector_spec (line 57) | def test_list_probes_with_detector_spec(capsys, options): function test_list_probes_verbose_table (line 73) | def test_list_probes_verbose_table(capsys): function test_list_probes_verbose_with_probe_spec (line 95) | def test_list_probes_verbose_with_probe_spec(capsys): FILE: tests/conftest.py function mitigation_outputs (line 33) | def mitigation_outputs() -> Tuple[List[str], List[str]]: function config_cleanup (line 38) | def config_cleanup(request): function pytest_configure (line 77) | def pytest_configure(config): function check_storage (line 84) | def check_storage(required_space_gb=1, path="/"): function pytest_runtest_setup (line 100) | def pytest_runtest_setup(item): FILE: tests/detectors/test_detectors.py function test_detector_structure (line 38) | def test_detector_structure(classname): function test_detector_detect (line 64) | def test_detector_detect(classname): function test_detector_metadata (line 128) | def test_detector_metadata(classname): FILE: tests/detectors/test_detectors_always.py function test_load (line 18) | def test_load(detectorname): function test_fail (line 23) | def test_fail(): function test_pass (line 31) | def test_pass(): function test_passthru (line 38) | def test_passthru(): FILE: tests/detectors/test_detectors_ansiescape.py function _test_attempt (line 10) | def _test_attempt(d): function test_ansiescape_raw_load (line 19) | def test_ansiescape_raw_load(): function test_ansiescape_raw_strings (line 24) | def test_ansiescape_raw_strings(): function test_ansiescape_escaped_load (line 36) | def test_ansiescape_escaped_load(): function test_ansiescape_escaped_strings (line 41) | def test_ansiescape_escaped_strings(): FILE: tests/detectors/test_detectors_apikey.py function _test_attempt (line 27) | def _test_attempt(d) -> garak.attempt.Attempt: function test_apikey_match (line 34) | def test_apikey_match(sample_key): function test_apikey_no_match (line 44) | def test_apikey_no_match(sample_not_key): function test_apikey_nonegroup (line 53) | def test_apikey_nonegroup(): FILE: tests/detectors/test_detectors_base.py function test_filedetector_nonexist (line 10) | def test_filedetector_nonexist(): function string_detector (line 28) | def string_detector(): function test_case_sensitive_exact_match (line 32) | def test_case_sensitive_exact_match(string_detector): function test_case_sensitive_no_match (line 42) | def test_case_sensitive_no_match(string_detector): function test_case_insensitive_match (line 64) | def test_case_insensitive_match(string_detector): function test_multiple_outputs (line 86) | def test_multiple_outputs(string_detector): function test_none_outputs (line 114) | def test_none_outputs(string_detector): function test_matchtype_with_case_sensitivity (line 154) | def test_matchtype_with_case_sensitivity(matchtype): function test_stringdetector_word_boundary_matching (line 181) | def test_stringdetector_word_boundary_matching(): function test_stringdetector_startswith (line 204) | def test_stringdetector_startswith(): FILE: tests/detectors/test_detectors_continuation.py function test_continuation_load (line 11) | def test_continuation_load(): function _test_attempt (line 29) | def _test_attempt(): function test_continuation_1_matching_trigger (line 33) | def test_continuation_1_matching_trigger(): function test_continuation_1_split_trigger (line 44) | def test_continuation_1_split_trigger(split_point): function test_non_continuation (line 56) | def test_non_continuation(): function test_continuation_case_insensitive (line 66) | def test_continuation_case_insensitive(): function test_continuation_multitrigger_matchfirst (line 76) | def test_continuation_multitrigger_matchfirst(): function test_continuation_multitrigger_matchsecond (line 86) | def test_continuation_multitrigger_matchsecond(): function test_continuation_multitrigger_matchnone (line 96) | def test_continuation_multitrigger_matchnone(): function test_continuation_empty_triggers (line 106) | def test_continuation_empty_triggers(): function test_continuation_triggers_not_trigger (line 116) | def test_continuation_triggers_not_trigger(): FILE: tests/detectors/test_detectors_divergence.py function test_hallucination_due_to_excessive_length (line 6) | def test_hallucination_due_to_excessive_length(): function test_hallucination_due_to_repeated_structure (line 14) | def test_hallucination_due_to_repeated_structure(): function test_hallucination_due_to_fake_citation (line 22) | def test_hallucination_due_to_fake_citation(): function test_non_hallucinated_output (line 30) | def test_non_hallucinated_output(): function test_empty_output (line 38) | def test_empty_output(): FILE: tests/detectors/test_detectors_encoding.py function test_decodematch (line 14) | def test_decodematch(): function test_decodeapprox (line 53) | def test_decodeapprox(): FILE: tests/detectors/test_detectors_exploitation.py function test_load_exploitation_detector (line 21) | def test_load_exploitation_detector(detectorname): function test_jinja (line 26) | def test_jinja(): function test_python_code (line 62) | def test_python_code(): function test_sqli_success (line 86) | def test_sqli_success(): function test_sqli_echo (line 99) | def test_sqli_echo(): FILE: tests/detectors/test_detectors_fileformats.py function test_possiblepickle_init (line 18) | def test_possiblepickle_init(): function test_possiblepickle_filenames (line 33) | def test_possiblepickle_filenames(possible_pickle): function test_fileispickled_invalid_format (line 38) | def test_fileispickled_invalid_format(): function test_fileispickled_valid_format (line 48) | def test_fileispickled_valid_format(): function test_fileispickled_nonpickle (line 57) | def test_fileispickled_nonpickle(): function test_fileispickled_pickle_default (line 71) | def test_fileispickled_pickle_default(): function test_fileispickled_pickle_versioned (line 88) | def test_fileispickled_pickle_versioned(pickle_ver): function test_fileisexectuable_nonexec (line 101) | def test_fileisexectuable_nonexec(): function decoded_filename (line 117) | def decoded_filename(request, encoded_exec_filename): function test_fileisexectuable_exec (line 141) | def test_fileisexectuable_exec(decoded_filename): FILE: tests/detectors/test_detectors_judge.py function judge_config (line 14) | def judge_config(): function test_class_init (line 27) | def test_class_init(judge_config, klass): function test_model_as_judge_type (line 33) | def test_model_as_judge_type(klass): function test_klass_detect (line 63) | def test_klass_detect(judge_config, mocker, klass, response, res_val): FILE: tests/detectors/test_detectors_malwaregen.py function test_malwaregen_anycode (line 56) | def test_malwaregen_anycode(): FILE: tests/detectors/test_detectors_misleading.py function test_mustrefute_label (line 8) | def test_mustrefute_label(): FILE: tests/detectors/test_detectors_mitigation.py function test_mitigation_init (line 11) | def test_mitigation_init(): function test_mitigation_strings (line 16) | def test_mitigation_strings(mitigation_outputs: Tuple[List[str], List[st... FILE: tests/detectors/test_detectors_packagehallucination.py function test_pythonpypi_init (line 8) | def test_pythonpypi_init(): function test_pythonpypi_weird (line 35) | def test_pythonpypi_weird(): function test_pythonpypi_stdlib (line 47) | def test_pythonpypi_stdlib(): function test_pythonpypi_pypi (line 61) | def test_pythonpypi_pypi(): function test_pythonpypi_case_sensitive (line 75) | def test_pythonpypi_case_sensitive(): function test_rubygems_init (line 85) | def test_rubygems_init(): function test_rubygems_weird (line 90) | def test_rubygems_weird(): function test_rubygems_stdlib (line 100) | def test_rubygems_stdlib(): function test_rubygems_real (line 112) | def test_rubygems_real(): function test_rubygems_case_sensitive (line 124) | def test_rubygems_case_sensitive(): function test_javascriptnpm_init (line 134) | def test_javascriptnpm_init(): function test_javascriptnpm_weird (line 139) | def test_javascriptnpm_weird(): function test_javascriptnpm_stdlib (line 155) | def test_javascriptnpm_stdlib(): function test_javascriptnpm_real (line 169) | def test_javascriptnpm_real(): function test_javascriptnpm_case_sensitive (line 183) | def test_javascriptnpm_case_sensitive(): function test_rustcrates_init (line 193) | def test_rustcrates_init(): function test_rustcrates_weird (line 198) | def test_rustcrates_weird(): function test_rustcrates_stdlib (line 210) | def test_rustcrates_stdlib(): function test_rustcrates_real (line 222) | def test_rustcrates_real(): function test_rustcrates_case_sensitive (line 234) | def test_rustcrates_case_sensitive(): function test_rustcrates_direct_usage (line 244) | def test_rustcrates_direct_usage(): function test_cutoff_restriction (line 267) | def test_cutoff_restriction(lang): function test_result_alignment (line 281) | def test_result_alignment(lang): function test_rakuland_detector_init (line 314) | def test_rakuland_detector_init(): function test_rakuland_hallucinated_package (line 319) | def test_rakuland_hallucinated_package(): function test_rakuland_known_package (line 330) | def test_rakuland_known_package(): function test_perl_detector_init (line 349) | def test_perl_detector_init(): function test_perl_hallucinated_package (line 354) | def test_perl_hallucinated_package(): function test_perl_known_package (line 365) | def test_perl_known_package(): function test_dart_detector_init (line 374) | def test_dart_detector_init(): function test_dart_known_package (line 379) | def test_dart_known_package(): function test_dart_hallucinated_package (line 388) | def test_dart_hallucinated_package(): FILE: tests/detectors/test_detectors_productkey.py function _test_prompt (line 11) | def _test_prompt(d): function test_win5x5_init (line 15) | def test_win5x5_init(): function test_win5x5_weird (line 20) | def test_win5x5_weird(): function test_win5x5_valid (line 28) | def test_win5x5_valid(): function test_win5x5_case_sensitive (line 46) | def test_win5x5_case_sensitive(): FILE: tests/detectors/test_detectors_promptinject.py function test_promptinject_load (line 11) | def test_promptinject_load(): function test_promptinject_1_matching_trigger (line 29) | def test_promptinject_1_matching_trigger(): function test_promptinject_case_insensitive (line 39) | def test_promptinject_case_insensitive(): function test_promptinject_multitrigger_matchfirst (line 49) | def test_promptinject_multitrigger_matchfirst(): function test_promptinject_multitrigger_matchsecond (line 59) | def test_promptinject_multitrigger_matchsecond(): function test_promptinject_multitrigger_matchnone (line 69) | def test_promptinject_multitrigger_matchnone(): FILE: tests/detectors/test_detectors_shields.py function up_detector (line 11) | def up_detector(): function down_detector (line 16) | def down_detector(): function test_up_detector_default_strings (line 20) | def test_up_detector_default_strings(up_detector): function test_up_detector_non_matching (line 44) | def test_up_detector_non_matching(up_detector): function test_up_detector_custom_strings (line 63) | def test_up_detector_custom_strings(): function test_down_detector_default_strings (line 75) | def test_down_detector_default_strings(down_detector): function test_down_detector_non_matching (line 96) | def test_down_detector_non_matching(down_detector): function test_down_detector_custom_strings (line 115) | def test_down_detector_custom_strings(): function test_multiple_outputs (line 127) | def test_multiple_outputs(): function test_case_sensitivity (line 146) | def test_case_sensitivity(): FILE: tests/detectors/test_detectors_unsafe_content.py function test_data_files_loaded_properly (line 32) | def test_data_files_loaded_properly(): function test_tox_unsafe (line 40) | def test_tox_unsafe(klassname): function test_tox_safe (line 52) | def test_tox_safe(klassname): function test_surge_word_match (line 71) | def test_surge_word_match(classname): FILE: tests/detectors/test_detectors_web_injection.py function test_web_injection_unsafe (line 62) | def test_web_injection_unsafe(klassname, outputs, notes): function test_web_injection_extended (line 126) | def test_web_injection_extended(): FILE: tests/generators/conftest.py function openai_compat_mocks (line 10) | def openai_compat_mocks(): function hf_endpoint_mocks (line 19) | def hf_endpoint_mocks(): function watsonx_compat_mocks (line 31) | def watsonx_compat_mocks(): function mistral_compat_mocks (line 40) | def mistral_compat_mocks(): FILE: tests/generators/test_azure.py function set_fake_env (line 12) | def set_fake_env(request) -> None: function test_azureopenai_invalid_model_names (line 37) | def test_azureopenai_invalid_model_names(): function test_azureopenai_chat (line 54) | def test_azureopenai_chat(respx_mock, openai_compat_mocks): FILE: tests/generators/test_bedrock.py function mock_boto3 (line 18) | def mock_boto3(): function set_aws_env (line 47) | def set_aws_env(request): function test_bedrock_import (line 69) | def test_bedrock_import(): function test_bedrock_initialization (line 79) | def test_bedrock_initialization(): function test_bedrock_model_alias_resolution (line 89) | def test_bedrock_model_alias_resolution(): function test_bedrock_invalid_model_id (line 108) | def test_bedrock_invalid_model_id(): function test_bedrock_successful_generation (line 119) | def test_bedrock_successful_generation(mock_boto3): function test_bedrock_parameter_mapping (line 138) | def test_bedrock_parameter_mapping(mock_boto3): function test_bedrock_conversation_to_message_format (line 164) | def test_bedrock_conversation_to_message_format(mock_boto3): function test_bedrock_malformed_response_handling (line 197) | def test_bedrock_malformed_response_handling(mock_boto3): function test_bedrock_validation_error_does_not_retry (line 224) | def test_bedrock_validation_error_does_not_retry(mock_boto3): function test_bedrock_access_denied_error_does_not_retry (line 249) | def test_bedrock_access_denied_error_does_not_retry(mock_boto3): FILE: tests/generators/test_cohere.py function set_fake_env (line 34) | def set_fake_env(): function cohere_mock_responses (line 47) | def cohere_mock_responses(): function mock_cohere_endpoint (line 69) | def mock_cohere_endpoint(respx_mock, path, spec): function test_cohere_instantiation (line 80) | def test_cohere_instantiation(): function test_cohere_missing_api_key (line 96) | def test_cohere_missing_api_key(): function test_cohere_default_parameters (line 107) | def test_cohere_default_parameters(): function test_api_version_validation (line 119) | def test_api_version_validation(): function test_cohere_generate_api_respx (line 147) | def test_cohere_generate_api_respx(respx_mock, cohere_mock_responses): function test_cohere_chat_api_respx (line 185) | def test_cohere_chat_api_respx( function test_chat_response_logs_warning (line 214) | def test_chat_response_logs_warning(respx_mock, cohere_mock_responses, c... FILE: tests/generators/test_function.py function passed_function (line 6) | def passed_function(prompt: str, **kwargs): function passed_function_multi (line 10) | def passed_function_multi(prompt: str, generations: int, **kwargs): function test_function_single (line 14) | def test_function_single(capsys): function test_function_multiple (line 30) | def test_function_multiple(capsys): FILE: tests/generators/test_generators.py function test_parallel_requests (line 25) | def test_parallel_requests(): function test_generator_structure (line 44) | def test_generator_structure(classname): function test_instantiate_generators (line 102) | def test_instantiate_generators(classname): function test_generator_signature (line 142) | def test_generator_signature(classname): function test_skip_seq (line 164) | def test_skip_seq(): FILE: tests/generators/test_ggml.py function set_fake_env (line 11) | def set_fake_env() -> None: function test_init_bad_app (line 15) | def test_init_bad_app(): function test_init_missing_model (line 22) | def test_init_missing_model(): function test_init_bad_model (line 29) | def test_init_bad_model(): function test_init_good_model (line 41) | def test_init_good_model(): function test_command_args_list (line 50) | def test_command_args_list(): FILE: tests/generators/test_groq.py function test_groq_invalid_multiple_completions (line 8) | def test_groq_invalid_multiple_completions(): function test_groq_instantiate (line 23) | def test_groq_instantiate(): function test_groq_generate_1 (line 31) | def test_groq_generate_1(): FILE: tests/generators/test_huggingface.py function hf_generator_config (line 11) | def hf_generator_config(): function hf_mock_response (line 27) | def hf_mock_response(hf_endpoint_mocks): function test_pipeline (line 37) | def test_pipeline(hf_generator_config): function test_pipeline_chat (line 57) | def test_pipeline_chat(mocker, hf_generator_config): function test_inference (line 73) | def test_inference(mocker, hf_mock_response, hf_generator_config): function test_endpoint (line 102) | def test_endpoint(mocker, hf_mock_response, hf_generator_config): function test_model (line 129) | def test_model(hf_generator_config): function test_model_chat (line 147) | def test_model_chat(mocker, hf_generator_config): function test_select_hf_device (line 163) | def test_select_hf_device(): FILE: tests/generators/test_langchain_serve.py function set_env_vars (line 10) | def set_env_vars(): function test_validate_uri (line 16) | def test_validate_uri(): function test_langchain_serve_generator_initialization (line 22) | def test_langchain_serve_generator_initialization(): function test_langchain_serve_generation (line 29) | def test_langchain_serve_generation(requests_mock): function test_error_handling (line 42) | def test_error_handling(requests_mock): function test_bad_response_handling (line 52) | def test_bad_response_handling(requests_mock): FILE: tests/generators/test_litellm.py function test_litellm_openai (line 21) | def test_litellm_openai(): function test_litellm_openrouter (line 46) | def test_litellm_openrouter(): function test_litellm_model_detection (line 65) | def test_litellm_model_detection(): function test_litellm_suppressed_params (line 85) | def test_litellm_suppressed_params(): FILE: tests/generators/test_llava.py function llava_config (line 32) | def llava_config(): function llava_test_image (line 42) | def llava_test_image(tmp_path): function mock_hf_when_cpu (line 53) | def mock_hf_when_cpu(monkeypatch): function test_llava_instantiation_and_device (line 79) | def test_llava_instantiation_and_device(llava_config, target_name): function test_llava_generate_returns_decoded_text (line 89) | def test_llava_generate_returns_decoded_text( function test_llava_error_on_missing_image (line 107) | def test_llava_error_on_missing_image(llava_config): function test_llava_unsupported_model (line 116) | def test_llava_unsupported_model(llava_config): function test_llava_missing_target_name (line 124) | def test_llava_missing_target_name(llava_config): function test_llava_supported_models_list (line 130) | def test_llava_supported_models_list(): FILE: tests/generators/test_mistral.py function set_fake_env (line 13) | def set_fake_env(request) -> None: function test_mistral_generator (line 34) | def test_mistral_generator(respx_mock, mistral_compat_mocks): function test_mistral_chat (line 58) | def test_mistral_chat(): FILE: tests/generators/test_muiltiprocessing_support.py function build_test_instance (line 30) | def build_test_instance(module_klass): function generate_in_subprocess (line 46) | def generate_in_subprocess(*args): function test_multiprocessing (line 52) | def test_multiprocessing(classname): FILE: tests/generators/test_nim.py function test_nim_instantiate (line 16) | def test_nim_instantiate(): function test_nim_generate_1 (line 24) | def test_nim_generate_1(): function test_nim_parallel_attempts (line 48) | def test_nim_parallel_attempts(): function test_nim_hf_detector (line 59) | def test_nim_hf_detector(): function test_nim_conservative_api (line 68) | def test_nim_conservative_api(): # extraneous params can throw 422 function test_nim_vision_prep (line 90) | def test_nim_vision_prep(): FILE: tests/generators/test_nvcf.py function test_instantiate (line 15) | def test_instantiate(klassname): function test_version_endpoint (line 25) | def test_version_endpoint(klassname): function test_custom_keys (line 38) | def test_custom_keys(klassname): FILE: tests/generators/test_ollama.py function ollama_is_running (line 26) | def ollama_is_running(): function no_models (line 41) | def no_models(): function test_error_on_nonexistant_model_chat (line 72) | def test_error_on_nonexistant_model_chat(): function test_error_on_nonexistant_model (line 90) | def test_error_on_nonexistant_model(): function test_generation_on_pulled_model_chat (line 116) | def test_generation_on_pulled_model_chat(): function test_generation_on_pulled_model (line 141) | def test_generation_on_pulled_model(): function test_ollama_generation_mocked (line 158) | def test_ollama_generation_mocked(respx_mock): function test_ollama_generation_chat_mocked (line 179) | def test_ollama_generation_chat_mocked(respx_mock): function test_error_on_nonexistant_model_mocked (line 194) | def test_error_on_nonexistant_model_mocked(respx_mock): function test_error_on_nonexistant_model_chat_mocked (line 207) | def test_error_on_nonexistant_model_chat_mocked(respx_mock): FILE: tests/generators/test_openai.py function set_fake_env (line 16) | def set_fake_env(request) -> None: function test_openai_version (line 30) | def test_openai_version(): function test_openai_invalid_model_names (line 36) | def test_openai_invalid_model_names(respx_mock, openai_compat_mocks): function test_openai_completion (line 50) | def test_openai_completion(): function test_openai_chat (line 70) | def test_openai_chat(): function test_reasoning_switch (line 97) | def test_reasoning_switch(): FILE: tests/generators/test_openai_compatible.py function compatible (line 33) | def compatible() -> Iterable[OpenAICompatible]: function build_test_instance (line 56) | def build_test_instance(module_klass): function generate_in_subprocess (line 68) | def generate_in_subprocess(*args): function test_openai_multiprocessing (line 89) | def test_openai_multiprocessing(openai_compat_mocks, classname): function test_openai_multiple_generations (line 128) | def test_openai_multiple_generations(): FILE: tests/generators/test_rest.py function set_rest_config (line 15) | def set_rest_config(): function test_rest_generator_initialization (line 27) | def test_rest_generator_initialization(): function test_plaintext_rest (line 35) | def test_plaintext_rest(requests_mock): function test_json_rest_top_level (line 47) | def test_json_rest_top_level(requests_mock): function test_json_rest_list (line 63) | def test_json_rest_list(requests_mock): function test_json_rest_deeper (line 77) | def test_json_rest_deeper(requests_mock): function test_rest_skip_code (line 106) | def test_rest_skip_code(requests_mock): function test_rest_valid_proxy (line 134) | def test_rest_valid_proxy(mocker, requests_mock): function test_rest_invalid_proxy (line 170) | def test_rest_invalid_proxy(requests_mock): function test_rest_ssl_suppression (line 185) | def test_rest_ssl_suppression(mocker, requests_mock, verify_ssl): function test_rest_non_latin1 (line 220) | def test_rest_non_latin1(): FILE: tests/generators/test_test.py function test_test_instantiate (line 23) | def test_test_instantiate(klassname): function test_test_gen (line 29) | def test_test_gen(klassname): function test_generators_test_blank (line 44) | def test_generators_test_blank(): function test_generators_test_repeat (line 57) | def test_generators_test_repeat(): function test_generators_test_single_one (line 66) | def test_generators_test_single_one(): function test_generators_test_single_many (line 90) | def test_generators_test_single_many(): function test_generators_test_single_too_many (line 107) | def test_generators_test_single_too_many(): function test_generators_test_blank_one (line 115) | def test_generators_test_blank_one(): function test_generators_test_blank_many (line 133) | def test_generators_test_blank_many(): FILE: tests/generators/test_watsonx.py function set_fake_env (line 10) | def set_fake_env(request) -> None: function test_bearer_token (line 33) | def test_bearer_token(watsonx_compat_mocks): function test_project (line 54) | def test_project(watsonx_compat_mocks): function test_deployment (line 70) | def test_deployment(watsonx_compat_mocks): FILE: tests/generators/test_websocket.py class TestWebSocketGenerator (line 12) | class TestWebSocketGenerator: method test_init_basic (line 15) | def test_init_basic(self): method test_init_secure (line 21) | def test_init_secure(self): method test_init_invalid_scheme (line 26) | def test_init_invalid_scheme(self): method test_init_no_uri (line 31) | def test_init_no_uri(self): method test_auth_basic (line 37) | def test_auth_basic(self): method test_auth_bearer (line 55) | def test_auth_bearer(self): method test_auth_env_var (line 72) | def test_auth_env_var(self): method test_format_message_simple (line 89) | def test_format_message_simple(self): method test_format_message_json_object (line 105) | def test_format_message_json_object(self): method test_extract_response_text_plain (line 130) | def test_extract_response_text_plain(self): method test_extract_response_text_json (line 146) | def test_extract_response_text_json(self): method test_extract_response_text_jsonpath (line 164) | def test_extract_response_text_jsonpath(self): method test_extract_response_text_json_fallback (line 187) | def test_extract_response_text_json_fallback(self): method test_connect_websocket_success (line 206) | async def test_connect_websocket_success(self): method test_send_and_receive_basic (line 220) | async def test_send_and_receive_basic(self): method test_send_and_receive_typing (line 245) | async def test_send_and_receive_typing(self): method test_call_model_integration (line 271) | def test_call_model_integration(self): method test_call_model_error_handling (line 297) | def test_call_model_error_handling(self): method test_apply_replacements_nested (line 312) | def test_apply_replacements_nested(self): method test_default_params_coverage (line 342) | def test_default_params_coverage(self): FILE: tests/harnesses/test_harnesses.py function test_harness_structure (line 17) | def test_harness_structure(classname): function test_harness_modality_match (line 32) | def test_harness_modality_match(): FILE: tests/langservice/conftest.py function cleanup_model_cache (line 8) | def cleanup_model_cache(request): function clear_langprovider_state (line 36) | def clear_langprovider_state(request): function enable_gpu_testing (line 54) | def enable_gpu_testing(): FILE: tests/langservice/detectors/test_detectors_leakreplay.py function reverse_translate (line 10) | def reverse_translate(attempt: Attempt) -> Attempt: function test_startswith_detect (line 28) | def test_startswith_detect(): FILE: tests/langservice/detectors/test_detectors_misleading.py function reverse_translate (line 11) | def reverse_translate(attempt: Attempt) -> Attempt: function test_must_contradict_NLI_detection (line 31) | def test_must_contradict_NLI_detection(): function test_hf_detector_detection (line 53) | def test_hf_detector_detection(): FILE: tests/langservice/detectors/test_detectors_snowball.py function reverse_translate (line 10) | def reverse_translate(attempt: Attempt) -> Attempt: function test_dont_start_no_reverse_translation (line 30) | def test_dont_start_no_reverse_translation(): function test_dont_start_yes_reverse_translation (line 47) | def test_dont_start_yes_reverse_translation(): FILE: tests/langservice/probes/test_probes_base.py function probe_pre_req (line 39) | def probe_pre_req(classname, request): function test_base_postprocess_attempt (line 106) | def test_base_postprocess_attempt(responses, mocker): function test_atkgen_probe_translation (line 151) | def test_atkgen_probe_translation(classname, mocker): function test_multi_modal_probe_translation (line 203) | def test_multi_modal_probe_translation(classname, mocker): function test_probe_prompt_translation (line 256) | def test_probe_prompt_translation(classname, mocker): FILE: tests/langservice/probes/test_probes_goodside.py function test_Tag_attempt_descrs_translation (line 17) | def test_Tag_attempt_descrs_translation(mocker): FILE: tests/langservice/test_langprovision.py function test_split_input_text (line 10) | def test_split_input_text(): function test_local_translate_single_language (line 30) | def test_local_translate_single_language(langprovider_class, target_lang... function test_same_source_and_target_language (line 74) | def test_same_source_and_target_language(langprovider_class, target_lang... function langprovider_remote (line 93) | def langprovider_remote(target_lang, langprovider_class): function test_remote_translate_single_language (line 132) | def test_remote_translate_single_language( FILE: tests/plugins/test_plugin_cache.py function reset_cache (line 15) | def reset_cache(request) -> None: function temp_cache_location (line 23) | def temp_cache_location(request) -> None: function remove_package_cache (line 42) | def remove_package_cache(request) -> None: function test_create (line 60) | def test_create(temp_cache_location): function test_existing (line 66) | def test_existing(): function test_missing_from_cache (line 71) | def test_missing_from_cache(): function test_unknown_type (line 79) | def test_unknown_type(): function test_unknown_class (line 85) | def test_unknown_class(): function test_unknown_module (line 91) | def test_unknown_module(): function test_invalid_class_path (line 97) | def test_invalid_class_path(): function test_module_removed (line 107) | def test_module_removed(temp_cache_location): function test_report_missing_package_file (line 121) | def test_report_missing_package_file(): FILE: tests/plugins/test_plugin_load.py function plugin_configuration (line 30) | def plugin_configuration(classname): function ensure_pickle_support (line 41) | def ensure_pickle_support(plugin_instance): function test_instantiate_probes (line 53) | def test_instantiate_probes(plugin_configuration): function test_instantiate_detectors (line 64) | def test_instantiate_detectors(plugin_configuration): function test_instantiate_harnesses (line 75) | def test_instantiate_harnesses(plugin_configuration): function test_instantiate_buffs (line 86) | def test_instantiate_buffs(plugin_configuration): function test_instantiate_generators (line 97) | def test_instantiate_generators(plugin_configuration): FILE: tests/plugins/test_plugin_provider.py function test_plugin_provider_instance_not_found (line 10) | def test_plugin_provider_instance_not_found(): function test_plugin_provider_store (line 18) | def test_plugin_provider_store(): FILE: tests/plugins/test_plugins.py function test_plugin_structure (line 18) | def test_plugin_structure(classname): FILE: tests/probes/test_probes.py function test_detector_specified (line 33) | def test_detector_specified(classname): # every probe should give detec... function test_probe_detector_exists (line 46) | def test_probe_detector_exists(classname): function test_probe_structure (line 59) | def test_probe_structure(classname): function test_probe_metadata (line 75) | def test_probe_metadata(classname): function test_check_docstring (line 104) | def test_check_docstring(plugin_name): function test_tag_format (line 120) | def test_tag_format(classname): function test_probe_prune_alignment (line 137) | def test_probe_prune_alignment(): function test_mint_attempt (line 159) | def test_mint_attempt(prompt): function test_mint_attempt_with_run_system_prompt (line 171) | def test_mint_attempt_with_run_system_prompt(prompt): FILE: tests/probes/test_probes_atkgen.py function test_atkgen_tox_load (line 14) | def test_atkgen_tox_load(): function test_atkgen_config (line 26) | def test_atkgen_config(): function test_atkgen_one_pass (line 41) | def test_atkgen_one_pass(): function test_atkgen_custom_model (line 63) | def test_atkgen_custom_model(): function test_atkgen_initialization (line 100) | def test_atkgen_initialization(classname): function test_atkgen_probe (line 113) | def test_atkgen_probe(classname): function test_atkgen_verbose_output (line 146) | def test_atkgen_verbose_output(capsys): function test_atkgen_nones (line 174) | def test_atkgen_nones(): FILE: tests/probes/test_probes_badcharacters.py function _load_badcharacters (line 7) | def _load_badcharacters(custom_config: dict | None = None): function test_badcharacters_generates_all_categories (line 12) | def test_badcharacters_generates_all_categories(): function test_badcharacters_respects_prompt_cap (line 37) | def test_badcharacters_respects_prompt_cap(): function test_badcharacters_inserts_expected_characters (line 58) | def test_badcharacters_inserts_expected_characters(): FILE: tests/probes/test_probes_continuation.py function test_continuation_load (line 18) | def test_continuation_load(probename): function test_continuation_counts_valid (line 24) | def test_continuation_counts_valid(probename): function test_continuation_continuations_valid (line 44) | def test_continuation_continuations_valid(probename): FILE: tests/probes/test_probes_dan.py function test_dan_ablation_unique (line 7) | def test_dan_ablation_unique(): FILE: tests/probes/test_probes_divergence.py function test_repeated_token_probe_prompt (line 5) | def test_repeated_token_probe_prompt(): function test_repeated_token_probe_invalid_encoding (line 17) | def test_repeated_token_probe_invalid_encoding(): function test_repeat_token_sample (line 35) | def test_repeat_token_sample(): function test_repeat_token_sample_num_tokens (line 49) | def test_repeat_token_sample_num_tokens(mocker): function test_repeat_token_sample_all (line 71) | def test_repeat_token_sample_all(): function test_repeat_token_single (line 95) | def test_repeat_token_single(encoding, test_token_string): FILE: tests/probes/test_probes_doctor.py function test_template_marker_presence (line 19) | def test_template_marker_presence(classname): function test_prompt_marker_absence (line 29) | def test_prompt_marker_absence(classname): FILE: tests/probes/test_probes_dra.py function test_dra_load (line 13) | def test_dra_load(probename): function test_dra_prompts_count (line 19) | def test_dra_prompts_count(probename): function test_dra_moderation_cache_loaded (line 25) | def test_dra_moderation_cache_loaded(probename): function test_dra_templates_loaded (line 42) | def test_dra_templates_loaded(probename): FILE: tests/probes/test_probes_encoding.py function test_encoding_len_cap (line 22) | def test_encoding_len_cap(classname): function test_encoding_prompt_trigger_match (line 32) | def test_encoding_prompt_trigger_match(classname): function test_encoding_triggers_not_in_prompts (line 41) | def test_encoding_triggers_not_in_prompts(classname): function test_encoding_prompt_cap (line 48) | def test_encoding_prompt_cap(classname): function test_encoding_suppress_prompt_cap (line 59) | def test_encoding_suppress_prompt_cap(classname): function test_atbash_function (line 87) | def test_atbash_function(plain, expected): FILE: tests/probes/test_probes_fileformats.py function test_hf_files_load (line 14) | def test_hf_files_load(): function test_hf_files_hf_repo (line 20) | def test_hf_files_hf_repo(): FILE: tests/probes/test_probes_fitd.py function test_fitd_probe (line 14) | def test_fitd_probe(classname): function test_fitd_verify_is_last_response_success (line 92) | def test_fitd_verify_is_last_response_success(): FILE: tests/probes/test_probes_latentinjection.py function test_latentinjection_structure (line 19) | def test_latentinjection_structure(classname): function test_whois_payload_injection_marker (line 62) | def test_whois_payload_injection_marker(): class TestFactSnippet (line 71) | class TestFactSnippet( function test_fact_snippet_build (line 81) | def test_fact_snippet_build(): FILE: tests/probes/test_probes_leakreplay.py function test_leakreplay_hitlog (line 16) | def test_leakreplay_hitlog(): function test_leakreplay_output_count (line 22) | def test_leakreplay_output_count(): function test_leakreplay_handle_incomplete_attempt (line 41) | def test_leakreplay_handle_incomplete_attempt(): function test_leakreplay_module_structure (line 48) | def test_leakreplay_module_structure(): function test_leakreplay_probe_structure (line 75) | def test_leakreplay_probe_structure(klassname): function test_leakreplay_probe_structure (line 141) | def test_leakreplay_probe_structure(klassname): FILE: tests/probes/test_probes_packagehallucination.py function reload_config (line 17) | def reload_config(request): function test_soft_promptcount (line 27) | def test_soft_promptcount(classname): function test_full_promptcount (line 38) | def test_full_promptcount(classname): FILE: tests/probes/test_probes_topic.py function sysnet (line 17) | def sysnet(): function test_topic_wordnet_load (line 33) | def test_topic_wordnet_load(probename): function test_topic_wordnet_version (line 39) | def test_topic_wordnet_version(probename): function test_topic_wordnet_get_node_terms (line 45) | def test_topic_wordnet_get_node_terms(probename, sysnet): function test_topic_wordnet_get_node_children (line 52) | def test_topic_wordnet_get_node_children(probename, sysnet): function test_topic_wordnet_get_node_id (line 59) | def test_topic_wordnet_get_node_id(probename, sysnet): function test_topic_wordnet_blocklist_get_initial_nodes (line 64) | def test_topic_wordnet_blocklist_get_initial_nodes(sysnet): FILE: tests/probes/test_probes_visual_jailbreak.py function test_vjb_load (line 14) | def test_vjb_load(vjb_plugin_name): function test_prompt_counts (line 25) | def test_prompt_counts(): FILE: tests/resources/red_team/test_evaluation.py class TestJudge (line 11) | class TestJudge(EvaluationJudge): function initialJudgeAndAttempt (line 21) | def initialJudgeAndAttempt(): function test_EvaluationJudge_judge_score (line 37) | def test_EvaluationJudge_judge_score(initialJudgeAndAttempt, mocker, res... function test_EvaluationJudge_on_topic_score (line 55) | def test_EvaluationJudge_on_topic_score( FILE: tests/resources/test_fixer.py function test_fixer_empty (line 9) | def test_fixer_empty(mocker): function test_fixer_migrate (line 170) | def test_fixer_migrate( FILE: tests/test_attempt.py function test_prompt_structure (line 16) | def test_prompt_structure(): function test_message_setup (line 24) | def test_message_setup(): function test_message_serializable (line 39) | def test_message_serializable(): function test_message_image_load (line 47) | def test_message_image_load(): function test_message_internal_serialize (line 76) | def test_message_internal_serialize(): function test_conversation_internal_serialize (line 95) | def test_conversation_internal_serialize(): function test_last_message (line 108) | def test_last_message(): function cleanup (line 138) | def cleanup(request): function test_attempt_turn_taking (line 150) | def test_attempt_turn_taking(): function test_attempt_history_lengths (line 189) | def test_attempt_history_lengths(): function test_attempt_illegal_ops (line 220) | def test_attempt_illegal_ops(): function test_attempt_no_prompt_output_access (line 260) | def test_attempt_no_prompt_output_access(): function test_attempt_set_prompt_var (line 268) | def test_attempt_set_prompt_var(): function test_attempt_constructor_prompt (line 277) | def test_attempt_constructor_prompt(): function test_demo_attempt_dialogue_method_usage (line 287) | def test_demo_attempt_dialogue_method_usage(): function test_attempt_outputs (line 396) | def test_attempt_outputs(): function test_attempt_all_outputs (line 437) | def test_attempt_all_outputs(): function test_attempt_message_prompt_init (line 460) | def test_attempt_message_prompt_init(): function test_json_serialize (line 468) | def test_json_serialize(): function test_attempt_sticky_params (line 570) | def test_attempt_sticky_params(capsys): function test_prompt_for (line 591) | def test_prompt_for(): function test_outputs_for (line 618) | def test_outputs_for(): function test_attempt_prompt_no_str (line 639) | def test_attempt_prompt_no_str(): function test_attempt_asdict (line 644) | def test_attempt_asdict(): FILE: tests/test_config.py function allow_site_config (line 98) | def allow_site_config(request): function override_xdg_env (line 120) | def override_xdg_env(request): function clear_xdg_env (line 143) | def clear_xdg_env(request): function temp_package_dir (line 166) | def temp_package_dir(request): function test_xdg_support (line 190) | def test_xdg_support(override_xdg_env): function test_xdg_defaults (line 201) | def test_xdg_defaults(): function test_cli_solo_settings (line 224) | def test_cli_solo_settings(option): function test_cli_param_settings (line 233) | def test_cli_param_settings(param): function test_cli_spec_settings (line 243) | def test_cli_spec_settings(param): function test_cli_shortform (line 252) | def test_cli_shortform(): function test_yaml_param_settings (line 264) | def test_yaml_param_settings(param): function test_site_yaml_overrides_core_yaml (line 286) | def test_site_yaml_overrides_core_yaml(): function test_run_yaml_overrides_site_yaml (line 301) | def test_run_yaml_overrides_site_yaml(): function test_cli_overrides_run_yaml (line 320) | def test_cli_overrides_run_yaml(): function test_probe_options_yaml (line 342) | def test_probe_options_yaml(capsys): function test_generator_options_yaml (line 368) | def test_generator_options_yaml(capsys): function test_run_from_yaml (line 399) | def test_run_from_yaml(capsys): function test_cli_generator_options_file (line 435) | def test_cli_generator_options_file(): function test_cli_probe_options_file (line 452) | def test_cli_probe_options_file(): function test_cli_probe_options_overrides_yaml_probe_options (line 469) | def test_cli_probe_options_overrides_yaml_probe_options(): function test_cli_generator_options_overrides_yaml_probe_options (line 507) | def test_cli_generator_options_overrides_yaml_probe_options(): function test_blank_probe_instance_loads_yaml_config (line 537) | def test_blank_probe_instance_loads_yaml_config(): function test_blank_probe_instance_loads_cli_config (line 567) | def test_blank_probe_instance_loads_cli_config(): function test_blank_generator_instance_loads_yaml_config (line 591) | def test_blank_generator_instance_loads_yaml_config(): function test_blank_generator_instance_loads_cli_config (line 623) | def test_blank_generator_instance_loads_cli_config(): function test_probespec_loading (line 648) | def test_probespec_loading(): function test_buff_config_assertion (line 692) | def test_buff_config_assertion(): function test_tag_filter (line 701) | def test_tag_filter(): function test_report_dir_full_path (line 717) | def test_report_dir_full_path(): function test_report_prefix_with_hitlog_no_explode (line 744) | def test_report_prefix_with_hitlog_no_explode(): function test_nested (line 756) | def test_nested(): function test_get_user_agents (line 761) | def test_get_user_agents(): function test_set_agents (line 769) | def test_set_agents(): function httpserver (line 781) | def httpserver(): function test_agent_is_used_requests (line 785) | def test_agent_is_used_requests(httpserver: HTTPServer): function test_agent_is_used_httpx (line 795) | def test_agent_is_used_httpx(httpserver: HTTPServer): function test_agent_is_used_aiohttp (line 805) | def test_agent_is_used_aiohttp(httpserver: HTTPServer): function test_api_key_in_config (line 822) | def test_api_key_in_config(): function test_site_yaml_overrides_max_workers (line 829) | def test_site_yaml_overrides_max_workers(capsys): function test_model_target_switching (line 861) | def test_model_target_switching(type_key, name_key): function test_model_target_override (line 888) | def test_model_target_override(): function test_load_json_config (line 913) | def test_load_json_config(): function test_load_json_config_via_load_config_files (line 932) | def test_load_json_config_via_load_config_files(): function test_site_config_ambiguity_error (line 954) | def test_site_config_ambiguity_error(): function test_extension_less_config_finds_json (line 975) | def test_extension_less_config_finds_json(temp_package_dir): function test_extension_less_requires_explicit_yaml (line 993) | def test_extension_less_requires_explicit_yaml(temp_package_dir, capsys): function test_extension_less_bundled_json_works (line 1016) | def test_extension_less_bundled_json_works(temp_package_dir): function test_extension_less_warns_on_direct_path_ambiguity (line 1034) | def test_extension_less_warns_on_direct_path_ambiguity(caplog): function test_explicit_yaml_extension_works (line 1069) | def test_explicit_yaml_extension_works(temp_package_dir): function test_explicit_yml_extension_works (line 1088) | def test_explicit_yml_extension_works(temp_package_dir): function test_site_yml_config_works (line 1108) | def test_site_yml_config_works(): function test_uppercase_json_extension_works (line 1123) | def test_uppercase_json_extension_works(temp_package_dir): function test_uppercase_yaml_extension_works (line 1142) | def test_uppercase_yaml_extension_works(temp_package_dir): function test_uppercase_yml_extension_works (line 1161) | def test_uppercase_yml_extension_works(temp_package_dir): function test_mixed_case_yaml_extension_works (line 1180) | def test_mixed_case_yaml_extension_works(temp_package_dir): FILE: tests/test_configurable.py function generator_sub_config (line 10) | def generator_sub_config(): class mockConfigurable (line 23) | class mockConfigurable(Configurable): method __init__ (line 38) | def __init__( function test_config_root_only (line 50) | def test_config_root_only(generator_sub_config): function test_config_root_module_classname (line 57) | def test_config_root_module_classname(generator_sub_config): function test_config_root_as_dict (line 66) | def test_config_root_as_dict(generator_sub_config): function test_param_provided (line 74) | def test_param_provided(generator_sub_config): function test_run_vars_propagate_to_instance (line 81) | def test_run_vars_propagate_to_instance(generator_sub_config): function test_class_over_run_vars_propagate_to_instance (line 94) | def test_class_over_run_vars_propagate_to_instance(generator_sub_config): function test_class_vars_propagate_to_instance (line 113) | def test_class_vars_propagate_to_instance(generator_sub_config): function test_class_dict_merge_to_instance (line 120) | def test_class_dict_merge_to_instance(generator_sub_config): function test_config_mask_class_vars_to_instance (line 130) | def test_config_mask_class_vars_to_instance(generator_sub_config): function test_config_supported_params (line 137) | def test_config_supported_params(generator_sub_config): FILE: tests/test_data.py function random_resource_filename (line 17) | def random_resource_filename(request) -> None: function test_no_relative_escape (line 34) | def test_no_relative_escape(): function test_no_relative_escape_extended (line 40) | def test_no_relative_escape_extended(): function test_allow_relative_in_path (line 47) | def test_allow_relative_in_path(): function test_known_resource_found (line 52) | def test_known_resource_found(): function test_local_override (line 58) | def test_local_override(random_resource_filename): function random_file_tree (line 74) | def random_file_tree(request) -> None: function test_consolidated_glob (line 113) | def test_consolidated_glob(random_file_tree): function test_consolidated_rglob (line 125) | def test_consolidated_rglob(random_file_tree): FILE: tests/test_docs.py function test_top_docs (line 30) | def test_top_docs(category: str): function test_docs_probes (line 42) | def test_docs_probes(classname: str): function test_docs_detectors (line 58) | def test_docs_detectors(classname: str): function test_docs_harnesses (line 74) | def test_docs_harnesses(classname: str): function test_docs_evaluators (line 90) | def test_docs_evaluators(classname: str): function test_docs_generators (line 106) | def test_docs_generators(classname: str): function test_docs_buffs (line 122) | def test_docs_buffs(classname: str): function test_check_plugin_class_docstring (line 158) | def test_check_plugin_class_docstring(plugin_name: str): function test_check_plugin_module_docstring (line 179) | def test_check_plugin_module_docstring(plugin_group: str): function doc_index_source_text (line 193) | def doc_index_source_text(): function test_root_modules_docs (line 198) | def test_root_modules_docs(doc_index_source_text, root_module: str): function test_core_config_options_explained (line 208) | def test_core_config_options_explained(): function test_doc_src_extensions (line 241) | def test_doc_src_extensions(doc_source_entry): function test_doc_src_no_markdown (line 253) | def test_doc_src_no_markdown(rst_file): FILE: tests/test_hitlog.py function test_hitlog_codepath (line 12) | def test_hitlog_codepath(): FILE: tests/test_internal_structures.py function _config_loaded (line 29) | def _config_loaded(): function test_generator_consume_attempt_generator (line 43) | def test_generator_consume_attempt_generator(): function test_attempt_outputs_can_consume_generator (line 66) | def test_attempt_outputs_can_consume_generator(): function test_evaluator_detector_naming (line 80) | def test_evaluator_detector_naming(mitigation_outputs: Tuple[List[str], ... FILE: tests/test_payloads.py function test_core_payloads (line 20) | def test_core_payloads(payload_name): function payload_typology (line 29) | def payload_typology(): function test_payload_Director (line 42) | def test_payload_Director(): function test_payload_list (line 47) | def test_payload_list(): function test_payloads_have_valid_tags (line 56) | def test_payloads_have_valid_tags(payload_name, payload_typology): function test_nonexistent_payload_direct_load (line 65) | def test_nonexistent_payload_direct_load(): function test_nonexistent_payload_manager_load (line 70) | def test_nonexistent_payload_manager_load(): function test_non_json_direct_load (line 76) | def test_non_json_direct_load(): function test_payload_schema_validation_ok (line 135) | def test_payload_schema_validation_ok(payload): function test_payload_schema_validation_bad (line 140) | def test_payload_schema_validation_bad(payload): function test_filtering (line 144) | def test_filtering(): function test_module_load (line 170) | def test_module_load(): function test_module_search (line 174) | def test_module_search(): FILE: tests/test_report.py function validate_avid_report_structure (line 11) | def validate_avid_report_structure(report): function sample_report (line 28) | def sample_report(): function sample_report_without_metadata (line 33) | def sample_report_without_metadata(tmp_path): function exported_avid_report (line 55) | def exported_avid_report(sample_report, request): function test_init_creates_report_object (line 71) | def test_init_creates_report_object(): function test_load_reads_report_file (line 84) | def test_load_reads_report_file(sample_report): function test_get_evaluations_extracts_metadata (line 94) | def test_get_evaluations_extracts_metadata(sample_report): function test_get_evaluations_extracts_evaluations_and_scores (line 108) | def test_get_evaluations_extracts_evaluations_and_scores(sample_report): function test_get_evaluations_raises_error_when_no_evals (line 135) | def test_get_evaluations_raises_error_when_no_evals(tmp_path): function test_export_creates_avid_report_file (line 157) | def test_export_creates_avid_report_file(exported_avid_report): function test_export_creates_avid_report_file_with_proper_structure (line 163) | def test_export_creates_avid_report_file_with_proper_structure(exported_... function test_export_includes_model_metadata_in_affects (line 180) | def test_export_includes_model_metadata_in_affects(exported_avid_report): function test_export_includes_problemtype_in_report (line 197) | def test_export_includes_problemtype_in_report(exported_avid_report): function test_export_includes_metrics_in_report (line 220) | def test_export_includes_metrics_in_report(exported_avid_report): function test_export_includes_vuln_id_in_avid_taxonomy (line 244) | def test_export_includes_vuln_id_in_avid_taxonomy(exported_avid_report): function test_export_works_without_metadata (line 266) | def test_export_works_without_metadata(sample_report_without_metadata): FILE: tests/test_reqs.py function test_requirements_txt_pyproject_toml (line 17) | def test_requirements_txt_pyproject_toml(): FILE: tests/test_sysprompt.py function test_system_prompt (line 10) | def test_system_prompt(): FILE: tools/packagehallucination/dart/create_dataset.py function fetch_pubdev_packages (line 7) | def fetch_pubdev_packages(delay=0.3): FILE: tools/packagehallucination/javascript/main.py function get_package_first_seen (line 16) | def get_package_first_seen(package_name): function main (line 34) | def main(): FILE: tools/packagehallucination/perl/create_dataset.py function fetch_perl_modules_from_release (line 8) | def fetch_perl_modules_from_release(pages=100, delay=0.3): FILE: tools/packagehallucination/python/main.py function get_all_packages (line 10) | def get_all_packages(): function get_package_first_seen (line 22) | def get_package_first_seen(package_name): function main (line 48) | def main(): FILE: tools/packagehallucination/ruby/main.py function get_package_first_seen (line 16) | def get_package_first_seen(gem_name): function main (line 36) | def main(): FILE: tools/rest/restserv.py function get_endpoint (line 10) | def get_endpoint(): FILE: tools/termscrape.py function scrape_search_results (line 10) | def scrape_search_results(keyphrase):