pyrit.prompt_target.limit_requests_per_minute#
- limit_requests_per_minute(func: Callable) Callable [source]#
A decorator to enforce rate limit of the target through setting requests per minute. This should be applied to all send_prompt_async() functions on PromptTarget and PromptChatTarget.
- Parameters:
func (Callable) – The function to be decorated.
- Returns:
The decorated function with a sleep introduced.
- Return type:
Callable