Instructions to use deepcode-ai/Prompt-Injection-LLM01 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Adapters
How to use deepcode-ai/Prompt-Injection-LLM01 with Adapters:
from adapters import AutoAdapterModel model = AutoAdapterModel.from_pretrained("undefined") model.load_adapter("deepcode-ai/Prompt-Injection-LLM01", set_active=True) - Notebooks
- Google Colab
- Kaggle
| # Python program showing | |
| # abstract base class work | |
| from abc import ABC, abstractmethod | |
| from typing import List | |
| class PromptMutator(ABC): | |
| def mutate(self,sample:str)->str: | |
| raise NotImplementedError | |
| def get_name(self): | |
| raise NotImplementedError | |
| def mutate_batch(self,sample_list:List): | |
| for sample in sample_list: | |
| self.mutate_sample(sample) |