Converters¶
- class aisploit.converters.Base64Converter(prefix: str = 'The following instruction is base64 encoded:', add_prefix: bool = True)¶
Bases:
BaseConverter
- add_prefix: bool¶
- prefix: str¶
- class aisploit.converters.GenderConverter(chat_model: aisploit.core.model.BaseChatModel, prompt: langchain_core.prompts.chat.ChatPromptTemplate = <factory>)¶
Bases:
BaseChatModelConverter
- prompt: ChatPromptTemplate¶
- class aisploit.converters.JoinConverter(*, separator: str = '-')¶
Bases:
BaseConverter
- class aisploit.converters.KeyboardTypoConverter(*, keyboard_neighbors={'a': ['q', 'w', 's', 'z'], 'b': ['v', 'g', 'h', 'n'], 'c': ['x', 'd', 'f', 'v'], 'd': ['w', 'e', 'r', 's', 'f', 'x', 'c'], 'e': ['w', 's', 'd', 'f', 'r'], 'f': ['e', 'r', 't', 'd', 'g', 'c', 'v'], 'g': ['r', 't', 'y', 'f', 'h', 'v', 'b'], 'h': ['t', 'y', 'u', 'g', 'j', 'b', 'n'], 'i': ['u', 'j', 'k', 'l', 'o'], 'j': ['y', 'u', 'i', 'h', 'k', 'n', 'm'], 'k': ['u', 'i', 'o', 'j', 'l', 'm'], 'l': ['i', 'o', 'p', 'k'], 'm': ['n', 'j', 'k'], 'n': ['b', 'h', 'j', 'm'], 'o': ['i', 'k', 'l', 'p'], 'p': ['o', 'l'], 'q': ['w', 'a', 's'], 'r': ['e', 'd', 'f', 'g', 't'], 's': ['q', 'w', 'e', 'a', 'd', 'z', 'x'], 't': ['r', 'f', 'g', 'h', 'y'], 'u': ['y', 'h', 'j', 'k', 'i'], 'v': ['c', 'f', 'g', 'b'], 'w': ['q', 'a', 's', 'd', 'e'], 'x': ['z', 's', 'd', 'c'], 'y': ['t', 'g', 'h', 'j', 'u'], 'z': ['a', 's', 'x']}, typo_probability=0.1, random_state=None)¶
Bases:
BaseConverter
- class aisploit.converters.LowercaseConverter¶
Bases:
BaseConverter
- class aisploit.converters.NoOpConverter¶
Bases:
BaseConverter
- class aisploit.converters.RemovePunctuationConverter¶
Bases:
BaseConverter
- class aisploit.converters.SequenceConverter(*, converters: Sequence[BaseConverter] = [])¶
Bases:
BaseConverter
- class aisploit.converters.StemmingConverter¶
Bases:
BaseConverter
- class aisploit.converters.TitlecaseConverter¶
Bases:
BaseConverter
- class aisploit.converters.TranslationConverter(chat_model: aisploit.core.model.BaseChatModel, language: str, prompt: langchain_core.prompts.chat.ChatPromptTemplate = <factory>)¶
Bases:
BaseChatModelConverter
- language: str¶
- prompt: ChatPromptTemplate¶
- class aisploit.converters.UnicodeConfusableConverter(*, random_state=None)¶
Bases:
BaseConverter
- class aisploit.converters.UnicodeTagsConverter(prefix: str = '', suffix: str = '', add_sequence_markers: bool = False)¶
Bases:
BaseConverter
- add_sequence_markers: bool¶
- prefix: str¶
- suffix: str¶
- class aisploit.converters.UppercaseConverter¶
Bases:
BaseConverter