pyrit.prompt_target.PromptChatTarget#

class PromptChatTarget(*, max_requests_per_minute: int | None = None)[source]#

Bases: PromptTarget

__init__(*, max_requests_per_minute: int | None = None) None[source]#

Methods

__init__(*[, max_requests_per_minute])

dispose_db_engine()

Dispose DuckDB database engine to release database connections and resources.

get_identifier()

send_chat_prompt_async(*, prompt, ...[, ...])

Sends a text prompt to the target without having to build the prompt request.

send_prompt_async(*, prompt_request)

Sends a normalized prompt async to the prompt target.

set_system_prompt(*, system_prompt, ...[, ...])

Sets the system prompt for the prompt target.

Attributes

supported_converters

async send_chat_prompt_async(*, prompt: str, conversation_id: str, orchestrator_identifier: dict[str, str] | None = None, labels: dict[str, str] | None = None) PromptRequestResponse[source]#

Sends a text prompt to the target without having to build the prompt request.

set_system_prompt(*, system_prompt: str, conversation_id: str, orchestrator_identifier: dict[str, str] | None = None, labels: dict[str, str] | None = None) None[source]#

Sets the system prompt for the prompt target. May be overridden by subclasses.