pyrit.models.PromptRequestResponse#

class PromptRequestResponse(request_pieces: list[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 (list[PromptRequestPiece]) – The list of prompt request pieces.

__init__(request_pieces: list[PromptRequestPiece])[source]#

Methods

__init__(request_pieces)

flatten_to_prompt_request_pieces(...)

validate()

Validates the request response.

static flatten_to_prompt_request_pieces(request_responses: Sequence[PromptRequestResponse]) list[PromptRequestPiece][source]#
validate()[source]#

Validates the request response.