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
File size: 428 Bytes
458492e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # Python program showing
# abstract base class work
from abc import ABC, abstractmethod
from typing import List
class PromptMutator(ABC):
@abstractmethod
def mutate(self,sample:str)->str:
raise NotImplementedError
@abstractmethod
def get_name(self):
raise NotImplementedError
def mutate_batch(self,sample_list:List):
for sample in sample_list:
self.mutate_sample(sample) |