pyrit.prompt_target.get_http_target_json_response_callback_function#
- get_http_target_json_response_callback_function(key: str) Callable[source]#
Determine proper parsing response function for an HTTP Request.
- Parameters:
key (str) – this is the path pattern to follow for parsing the output response (ie for AOAI this would be choices[0].message.content) (for BIC this needs to be a regex pattern for the desired output)
response_type (ResponseType) – this is the type of response (ie HTML or JSON)
- Returns:
proper output parsing response
- Return type:
Callable