pyrit.models.PromptRequestResponse#
- class PromptRequestResponse(request_pieces: Sequence[PromptRequestPiece])[source]#
Bases:
object
Represents a response to a prompt request.
This is a single request to a target. It can contain multiple prompt request pieces.
- Parameters:
request_pieces (Sequence[PromptRequestPiece]) – The list of prompt request pieces.
- __init__(request_pieces: Sequence[PromptRequestPiece])[source]#
Methods
__init__
(request_pieces)get_value
([n])Return the converted value of the nth request piece.
Return the converted values of all request pieces.
validate
()Validates the request response.
- static flatten_to_prompt_request_pieces(request_responses: Sequence[PromptRequestResponse]) MutableSequence[PromptRequestPiece] [source]#