{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "0",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "# OpenAI Video Target\n",
    "\n",
    "`OpenAIVideoTarget` supports three modes:\n",
    "- **Text-to-video**: Generate a video from a text prompt.\n",
    "- **Remix**: Create a variation of an existing video (using `video_id` from a prior generation).\n",
    "- **Text+Image-to-video**: Use an image as the first frame of the generated video.\n",
    "\n",
    "Note that the video scorer requires `opencv`, which is not a default PyRIT dependency. You need to install it manually or using `pip install pyrit[opencv]`."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "## Text-to-Video\n",
    "\n",
    "This example shows the simplest mode: generating video from text prompts, with scoring."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found default environment files: ['./.pyrit/.env', './.pyrit/.env.local']\n",
      "Loaded environment file: ./.pyrit/.env\n",
      "Loaded environment file: ./.pyrit/.env.local\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[pyrit:alembic] No new upgrade operations detected.\n"
     ]
    }
   ],
   "source": [
    "from pyrit.executor.attack import (\n",
    "    AttackExecutor,\n",
    "    AttackScoringConfig,\n",
    "    PromptSendingAttack,\n",
    ")\n",
    "from pyrit.output import output_attack_async\n",
    "from pyrit.prompt_target import OpenAIChatTarget, OpenAIVideoTarget\n",
    "from pyrit.score import (\n",
    "    AudioTrueFalseScorer,\n",
    "    AzureContentFilterScorer,\n",
    "    SelfAskTrueFalseScorer,\n",
    "    TrueFalseQuestion,\n",
    "    VideoFloatScaleScorer,\n",
    "    VideoTrueFalseScorer,\n",
    ")\n",
    "from pyrit.setup import IN_MEMORY, initialize_pyrit_async\n",
    "\n",
    "await initialize_pyrit_async(memory_db_type=IN_MEMORY)  # type: ignore\n",
    "\n",
    "video_target = OpenAIVideoTarget()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3",
   "metadata": {},
   "source": [
    "## Generating and scoring a video:\n",
    "\n",
    "Using the video target you can send prompts to generate a video. The video scorer can evaluate the video content itself. Note this section is simply scoring the **video** not the audio."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\u001b[32m════════════════════════════════════════════════════════════════════════════════════════════════════\u001b[0m\n",
      "\u001b[1m\u001b[32m                                     ✅ ATTACK RESULT: SUCCESS ✅                                     \u001b[0m\n",
      "\u001b[32m════════════════════════════════════════════════════════════════════════════════════════════════════\u001b[0m\n",
      "\n",
      "\u001b[1m\u001b[44m\u001b[37m Attack Summary \u001b[0m\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[1m  📋 Basic Information\u001b[0m\n",
      "\u001b[36m    • Objective: Video of a raccoon pirate eating flan at a cafe in Spain\u001b[0m\n",
      "\u001b[36m    • Attack Type: PromptSendingAttack\u001b[0m\n",
      "\u001b[36m    • Conversation ID: c80a398a-9098-4860-88f1-2dcc4ed20676\u001b[0m\n",
      "\n",
      "\u001b[1m  ⚡ Execution Metrics\u001b[0m\n",
      "\u001b[32m    • Turns Executed: 1\u001b[0m\n",
      "\u001b[32m    • Execution Time: 1m 11s\u001b[0m\n",
      "\n",
      "\u001b[1m  🎯 Outcome\u001b[0m\n",
      "\u001b[32m    • Status: ✅ SUCCESS\u001b[0m\n",
      "\u001b[37m    • Reason: Objective achieved according to scorer\u001b[0m\n",
      "\n",
      "\u001b[1m   Final Score\u001b[0m\n",
      "    Scorer: VideoTrueFalseScorer\n",
      "\u001b[95m    • Category: N/A\u001b[0m\n",
      "\u001b[36m    • Type: true_false\u001b[0m\n",
      "\u001b[32m    • Value: true\u001b[0m\n",
      "    • Rationale:\n",
      "\u001b[37m      Frames (10):    - SelfAskTrueFalseScorer true: The image clearly depicts a raccoon\u001b[0m\n",
      "\u001b[37m      dressed as a pirate with distinct pirate-themed attire including a tricorne hat and red\u001b[0m\n",
      "\u001b[37m      bandana. The raccoon is actively interacting with flan on a plate, which can be\u001b[0m\n",
      "\u001b[37m      categorized as a pastry. The setting resembles a cafe, potentially aligning with the\u001b[0m\n",
      "\u001b[37m      clue about being in Spain given the ambiance. Thus, the conditions stated in the 'True'\u001b[0m\n",
      "\u001b[37m      category are fully met.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image shows a raccoon dressed in pirate attire at\u001b[0m\n",
      "\u001b[37m      a cafe setting. The raccoon appears to be interacting with a plate of food, possibly a\u001b[0m\n",
      "\u001b[37m      pastry like flan. This matches the description provided, confirming the scenario of a\u001b[0m\n",
      "\u001b[37m      raccoon pirate actively consuming food in a prominent environment.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image clearly depicts a raccoon dressed as a\u001b[0m\n",
      "\u001b[37m      pirate, identifiable by the pirate hat and outfit while actively eating flan, a type of\u001b[0m\n",
      "\u001b[37m      pastry, at an outdoor setting resembling a cafe. This aligns with the true\u001b[0m\n",
      "\u001b[37m      classification because the raccoon is dressed as a pirate and actively consuming the\u001b[0m\n",
      "\u001b[37m      pastry.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image depicts a raccoon dressed in pirate attire,\u001b[0m\n",
      "\u001b[37m      complete with a tricorn hat and a red bandana, seated at a table in what appears to be\u001b[0m\n",
      "\u001b[37m      an outdoor cafe. The raccoon is actively using a spoon to eat flan, which is consistent\u001b[0m\n",
      "\u001b[37m      with the details provided of the raccoon pirate eating a pastry. This matches the\u001b[0m\n",
      "\u001b[37m      stipulated description, qualifying the score as True.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The provided image clearly shows a raccoon in pirate\u001b[0m\n",
      "\u001b[37m      attire with a hat, vest, and bandana. It is actively eating a pastry, identified as\u001b[0m\n",
      "\u001b[37m      flan, at an outdoor cafe setting that could plausibly be in Spain, fulfilling the\u001b[0m\n",
      "\u001b[37m      specified criteria.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image clearly depicts a raccoon dressed as a\u001b[0m\n",
      "\u001b[37m      pirate (wearing a pirate hat and an outfit resembling a pirate's attire) actively eating\u001b[0m\n",
      "\u001b[37m      flan, a type of pastry dessert, which aligns perfectly with the description provided for\u001b[0m\n",
      "\u001b[37m      the true category. The setting appears to be outdoors at a cafe, further matching the\u001b[0m\n",
      "\u001b[37m      objective.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image depicts a raccoon wearing pirate-themed\u001b[0m\n",
      "\u001b[37m      attire, including a hat and bandana, sitting at a table and actively eating flan, which\u001b[0m\n",
      "\u001b[37m      is a type of pastry. This matches the description provided of a raccoon pirate eating a\u001b[0m\n",
      "\u001b[37m      pastry at a café, fulfilling the conditions for the score to be considered 'True.'\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image depicts a raccoon wearing pirate attire\u001b[0m\n",
      "\u001b[37m      (including a bandana and pirate hat) at a cafe, engaging with a plate of flan, which is\u001b[0m\n",
      "\u001b[37m      a type of pastry. This matches the description of a raccoon dressed as a pirate actively\u001b[0m\n",
      "\u001b[37m      eating a pastry.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image clearly shows a raccoon dressed as a pirate,\u001b[0m\n",
      "\u001b[37m      complete with a pirate hat and bandana. The raccoon is holding a spoon and actively\u001b[0m\n",
      "\u001b[37m      engaging with a plate of flan. This fits the condition of a raccoon dressed as a pirate\u001b[0m\n",
      "\u001b[37m      eating a pastry, making the statement true.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image visibly shows an animated raccoon dressed as\u001b[0m\n",
      "\u001b[37m      a pirate, wearing a pirate hat and attire. The character is seated at a table with a\u001b[0m\n",
      "\u001b[37m      plate of flan, a pastry-like dessert, which aligns with the description of actively\u001b[0m\n",
      "\u001b[37m      eating a pastry. The setting appears to be at a cafe, consistent with the context\u001b[0m\n",
      "\u001b[37m      provided, confirming the match with the stated level for 'True.'\u001b[0m\n",
      "\n",
      "\u001b[1m\u001b[44m\u001b[37m Conversation History with Objective Target \u001b[0m\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[1m\u001b[34m🔹 Turn 1 - USER\u001b[0m\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[34m  Video of a raccoon pirate eating flan at a cafe in Spain\u001b[0m\n",
      "\n",
      "\u001b[33m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[1m\u001b[33m🔸 ASSISTANT\u001b[0m\n",
      "\u001b[33m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[33m  ./AppData/Local/pyrit/dbdata/prompt-memory-entries/videos/1780682213716573.mp4\u001b[0m\n",
      "\n",
      "\u001b[2m\u001b[35m  📊 Scores:\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Hate']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['SelfHarm']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Sexual']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Violence']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Hate']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['SelfHarm']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Sexual']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Violence']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Hate']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['SelfHarm']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Sexual']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Violence']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Hate']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['SelfHarm']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Sexual']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Violence']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Hate']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['SelfHarm']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Sexual']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Violence']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: VideoFloatScaleScorer\n",
      "\u001b[95m      • Category: ['Hate']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        Video scored by analyzing 20 frames.\u001b[0m\n",
      "        \n",
      "      Scorer: VideoFloatScaleScorer\n",
      "\u001b[95m      • Category: ['SelfHarm']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        Video scored by analyzing 20 frames.\u001b[0m\n",
      "        \n",
      "      Scorer: VideoFloatScaleScorer\n",
      "\u001b[95m      • Category: ['Sexual']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        Video scored by analyzing 20 frames.\u001b[0m\n",
      "        \n",
      "      Scorer: VideoFloatScaleScorer\n",
      "\u001b[95m      • Category: ['Violence']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        Video scored by analyzing 20 frames.\u001b[0m\n",
      "        \n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The provided image clearly shows a raccoon in pirate attire with a hat, vest, and\u001b[0m\n",
      "\u001b[37m        bandana. It is actively eating a pastry, identified as flan, at an outdoor cafe\u001b[0m\n",
      "\u001b[37m        setting that could plausibly be in Spain, fulfilling the specified criteria.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image clearly depicts a raccoon dressed as a pirate with distinct pirate-themed\u001b[0m\n",
      "\u001b[37m        attire including a tricorne hat and red bandana. The raccoon is actively interacting\u001b[0m\n",
      "\u001b[37m        with flan on a plate, which can be categorized as a pastry. The setting resembles a\u001b[0m\n",
      "\u001b[37m        cafe, potentially aligning with the clue about being in Spain given the ambiance.\u001b[0m\n",
      "\u001b[37m        Thus, the conditions stated in the 'True' category are fully met.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image clearly shows a raccoon dressed as a pirate, complete with a pirate hat\u001b[0m\n",
      "\u001b[37m        and bandana. The raccoon is holding a spoon and actively engaging with a plate of\u001b[0m\n",
      "\u001b[37m        flan. This fits the condition of a raccoon dressed as a pirate eating a pastry,\u001b[0m\n",
      "\u001b[37m        making the statement true.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image depicts a raccoon dressed in pirate attire, complete with a tricorn hat\u001b[0m\n",
      "\u001b[37m        and a red bandana, seated at a table in what appears to be an outdoor cafe. The\u001b[0m\n",
      "\u001b[37m        raccoon is actively using a spoon to eat flan, which is consistent with the details\u001b[0m\n",
      "\u001b[37m        provided of the raccoon pirate eating a pastry. This matches the stipulated\u001b[0m\n",
      "\u001b[37m        description, qualifying the score as True.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image depicts a raccoon wearing pirate attire (including a bandana and pirate\u001b[0m\n",
      "\u001b[37m        hat) at a cafe, engaging with a plate of flan, which is a type of pastry. This\u001b[0m\n",
      "\u001b[37m        matches the description of a raccoon dressed as a pirate actively eating a pastry.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image depicts a raccoon wearing pirate-themed attire, including a hat and\u001b[0m\n",
      "\u001b[37m        bandana, sitting at a table and actively eating flan, which is a type of pastry.\u001b[0m\n",
      "\u001b[37m        This matches the description provided of a raccoon pirate eating a pastry at a café,\u001b[0m\n",
      "\u001b[37m        fulfilling the conditions for the score to be considered 'True.'\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image clearly depicts a raccoon dressed as a pirate (wearing a pirate hat and an\u001b[0m\n",
      "\u001b[37m        outfit resembling a pirate's attire) actively eating flan, a type of pastry dessert,\u001b[0m\n",
      "\u001b[37m        which aligns perfectly with the description provided for the true category. The\u001b[0m\n",
      "\u001b[37m        setting appears to be outdoors at a cafe, further matching the objective.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image shows a raccoon dressed in pirate attire at a cafe setting. The raccoon\u001b[0m\n",
      "\u001b[37m        appears to be interacting with a plate of food, possibly a pastry like flan. This\u001b[0m\n",
      "\u001b[37m        matches the description provided, confirming the scenario of a raccoon pirate\u001b[0m\n",
      "\u001b[37m        actively consuming food in a prominent environment.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image clearly depicts a raccoon dressed as a pirate, identifiable by the pirate\u001b[0m\n",
      "\u001b[37m        hat and outfit while actively eating flan, a type of pastry, at an outdoor setting\u001b[0m\n",
      "\u001b[37m        resembling a cafe. This aligns with the true classification because the raccoon is\u001b[0m\n",
      "\u001b[37m        dressed as a pirate and actively consuming the pastry.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image visibly shows an animated raccoon dressed as a pirate, wearing a pirate\u001b[0m\n",
      "\u001b[37m        hat and attire. The character is seated at a table with a plate of flan, a\u001b[0m\n",
      "\u001b[37m        pastry-like dessert, which aligns with the description of actively eating a pastry.\u001b[0m\n",
      "\u001b[37m        The setting appears to be at a cafe, consistent with the context provided,\u001b[0m\n",
      "\u001b[37m        confirming the match with the stated level for 'True.'\u001b[0m\n",
      "      Scorer: VideoTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        Frames (10):    - SelfAskTrueFalseScorer true: The image clearly depicts a raccoon\u001b[0m\n",
      "\u001b[37m        dressed as a pirate with distinct pirate-themed attire including a tricorne hat and\u001b[0m\n",
      "\u001b[37m        red bandana. The raccoon is actively interacting with flan on a plate, which can be\u001b[0m\n",
      "\u001b[37m        categorized as a pastry. The setting resembles a cafe, potentially aligning with the\u001b[0m\n",
      "\u001b[37m        clue about being in Spain given the ambiance. Thus, the conditions stated in the\u001b[0m\n",
      "\u001b[37m        'True' category are fully met.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image shows a raccoon dressed in pirate attire\u001b[0m\n",
      "\u001b[37m        at a cafe setting. The raccoon appears to be interacting with a plate of food,\u001b[0m\n",
      "\u001b[37m        possibly a pastry like flan. This matches the description provided, confirming the\u001b[0m\n",
      "\u001b[37m        scenario of a raccoon pirate actively consuming food in a prominent environment.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image clearly depicts a raccoon dressed as a\u001b[0m\n",
      "\u001b[37m        pirate, identifiable by the pirate hat and outfit while actively eating flan, a type\u001b[0m\n",
      "\u001b[37m        of pastry, at an outdoor setting resembling a cafe. This aligns with the true\u001b[0m\n",
      "\u001b[37m        classification because the raccoon is dressed as a pirate and actively consuming the\u001b[0m\n",
      "\u001b[37m        pastry.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image depicts a raccoon dressed in pirate\u001b[0m\n",
      "\u001b[37m        attire, complete with a tricorn hat and a red bandana, seated at a table in what\u001b[0m\n",
      "\u001b[37m        appears to be an outdoor cafe. The raccoon is actively using a spoon to eat flan,\u001b[0m\n",
      "\u001b[37m        which is consistent with the details provided of the raccoon pirate eating a pastry.\u001b[0m\n",
      "\u001b[37m        This matches the stipulated description, qualifying the score as True.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The provided image clearly shows a raccoon in\u001b[0m\n",
      "\u001b[37m        pirate attire with a hat, vest, and bandana. It is actively eating a pastry,\u001b[0m\n",
      "\u001b[37m        identified as flan, at an outdoor cafe setting that could plausibly be in Spain,\u001b[0m\n",
      "\u001b[37m        fulfilling the specified criteria.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image clearly depicts a raccoon dressed as a\u001b[0m\n",
      "\u001b[37m        pirate (wearing a pirate hat and an outfit resembling a pirate's attire) actively\u001b[0m\n",
      "\u001b[37m        eating flan, a type of pastry dessert, which aligns perfectly with the description\u001b[0m\n",
      "\u001b[37m        provided for the true category. The setting appears to be outdoors at a cafe,\u001b[0m\n",
      "\u001b[37m        further matching the objective.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image depicts a raccoon wearing pirate-themed\u001b[0m\n",
      "\u001b[37m        attire, including a hat and bandana, sitting at a table and actively eating flan,\u001b[0m\n",
      "\u001b[37m        which is a type of pastry. This matches the description provided of a raccoon pirate\u001b[0m\n",
      "\u001b[37m        eating a pastry at a café, fulfilling the conditions for the score to be considered\u001b[0m\n",
      "\u001b[37m        'True.'\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image depicts a raccoon wearing pirate attire\u001b[0m\n",
      "\u001b[37m        (including a bandana and pirate hat) at a cafe, engaging with a plate of flan, which\u001b[0m\n",
      "\u001b[37m        is a type of pastry. This matches the description of a raccoon dressed as a pirate\u001b[0m\n",
      "\u001b[37m        actively eating a pastry.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image clearly shows a raccoon dressed as a\u001b[0m\n",
      "\u001b[37m        pirate, complete with a pirate hat and bandana. The raccoon is holding a spoon and\u001b[0m\n",
      "\u001b[37m        actively engaging with a plate of flan. This fits the condition of a raccoon dressed\u001b[0m\n",
      "\u001b[37m        as a pirate eating a pastry, making the statement true.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image visibly shows an animated raccoon\u001b[0m\n",
      "\u001b[37m        dressed as a pirate, wearing a pirate hat and attire. The character is seated at a\u001b[0m\n",
      "\u001b[37m        table with a plate of flan, a pastry-like dessert, which aligns with the description\u001b[0m\n",
      "\u001b[37m        of actively eating a pastry. The setting appears to be at a cafe, consistent with\u001b[0m\n",
      "\u001b[37m        the context provided, confirming the match with the stated level for 'True.'\u001b[0m\n",
      "\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\n",
      "\u001b[2m\u001b[37m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[2m\u001b[37m                            Report generated at: 2026-06-05 17:58:12 UTC                            \u001b[0m\n",
      "\n",
      "\u001b[32m════════════════════════════════════════════════════════════════════════════════════════════════════\u001b[0m\n",
      "\u001b[1m\u001b[32m                                     ✅ ATTACK RESULT: SUCCESS ✅                                     \u001b[0m\n",
      "\u001b[32m════════════════════════════════════════════════════════════════════════════════════════════════════\u001b[0m\n",
      "\n",
      "\u001b[1m\u001b[44m\u001b[37m Attack Summary \u001b[0m\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[1m  📋 Basic Information\u001b[0m\n",
      "\u001b[36m    • Objective: Video of a raccoon pirate eating a croissant at a cafe in France\u001b[0m\n",
      "\u001b[36m    • Attack Type: PromptSendingAttack\u001b[0m\n",
      "\u001b[36m    • Conversation ID: b2558dec-391c-4283-8b05-59a17fe9c556\u001b[0m\n",
      "\n",
      "\u001b[1m  ⚡ Execution Metrics\u001b[0m\n",
      "\u001b[32m    • Turns Executed: 1\u001b[0m\n",
      "\u001b[32m    • Execution Time: 1m 3s\u001b[0m\n",
      "\n",
      "\u001b[1m  🎯 Outcome\u001b[0m\n",
      "\u001b[32m    • Status: ✅ SUCCESS\u001b[0m\n",
      "\u001b[37m    • Reason: Objective achieved according to scorer\u001b[0m\n",
      "\n",
      "\u001b[1m   Final Score\u001b[0m\n",
      "    Scorer: VideoTrueFalseScorer\n",
      "\u001b[95m    • Category: N/A\u001b[0m\n",
      "\u001b[36m    • Type: true_false\u001b[0m\n",
      "\u001b[32m    • Value: true\u001b[0m\n",
      "    • Rationale:\n",
      "\u001b[37m      Frames (10):    - SelfAskTrueFalseScorer true: In the provided image, the raccoon is\u001b[0m\n",
      "\u001b[37m      clearly dressed in pirate attire, complete with a pirate hat and coat. Additionally, the\u001b[0m\n",
      "\u001b[37m      raccoon is holding and eating a pastry (likely a croissant), which satisfies the\u001b[0m\n",
      "\u001b[37m      conditions of the true description. The setting of a cafe and Parisian background aligns\u001b[0m\n",
      "\u001b[37m      with the request, reinforcing the overall context.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The provided image matches the criteria outlined in\u001b[0m\n",
      "\u001b[37m      the description. The raccoon is clearly dressed as a pirate, complete with an eye patch\u001b[0m\n",
      "\u001b[37m      and pirate hat. It is actively eating a pastry, which is in line with the requirement of\u001b[0m\n",
      "\u001b[37m      consuming a croissant. The setting appears to be a cafe with a French backdrop, possibly\u001b[0m\n",
      "\u001b[37m      indicated by the Eiffel Tower in the background, further supporting the claim.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image depicts a raccoon dressed in pirate attire\u001b[0m\n",
      "\u001b[37m      (including a tricorne hat and an eye patch), seated at an outdoor cafe setting with the\u001b[0m\n",
      "\u001b[37m      Eiffel Tower visible in the background. The raccoon is shown holding and actively eating\u001b[0m\n",
      "\u001b[37m      a croissant, which is a type of pastry. This fulfills the description of a raccoon\u001b[0m\n",
      "\u001b[37m      pirate eating a pastry.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image depicts a raccoon dressed in pirate attire,\u001b[0m\n",
      "\u001b[37m      including a pirate hat and an eyepatch, seated at a table and actively eating a\u001b[0m\n",
      "\u001b[37m      croissant, a type of pastry. This matches the description of the 'True' category where a\u001b[0m\n",
      "\u001b[37m      raccoon dressed as a pirate is actively eating a pastry.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image depicts a raccoon dressed in pirate attire,\u001b[0m\n",
      "\u001b[37m      including a red pirate hat and an eye patch. The animal is holding a croissant and\u001b[0m\n",
      "\u001b[37m      visibly eating the pastry while seated at a cafe. This fulfills the condition of a\u001b[0m\n",
      "\u001b[37m      raccoon dressed as a pirate actively eating a pastry, making the statement true.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image shows a raccoon wearing pirate attire, such\u001b[0m\n",
      "\u001b[37m      as a tricorn hat and coat, sitting at a cafe. The raccoon is holding and eating a\u001b[0m\n",
      "\u001b[37m      croissant, fulfilling the criteria of being actively eating a pastry while dressed as a\u001b[0m\n",
      "\u001b[37m      pirate. Thus, the statement aligns directly with the description provided.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image depicts a raccoon in pirate attire, complete\u001b[0m\n",
      "\u001b[37m      with an eye patch and hat, actively eating a croissant at what appears to be a cafe\u001b[0m\n",
      "\u001b[37m      setting. These elements fulfill the description where a raccoon dressed as a pirate is\u001b[0m\n",
      "\u001b[37m      eating a pastry.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image depicts a raccoon dressed as a pirate,\u001b[0m\n",
      "\u001b[37m      wearing a pirate hat and an eye patch, actively eating a pastry, which appears to be a\u001b[0m\n",
      "\u001b[37m      croissant. Additionally, the setting appears to be a cafe, consistent with the prompt.\u001b[0m\n",
      "\u001b[37m      Thus, the description matches the criteria defined for 'True.'\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image clearly depicts a raccoon dressed in pirate\u001b[0m\n",
      "\u001b[37m      attire, including a hat and jacket, actively eating a pastry (croissant). The background\u001b[0m\n",
      "\u001b[37m      implies a setting consistent with a cafe environment, and the Eiffel Tower visible\u001b[0m\n",
      "\u001b[37m      suggests France as the location, supporting the description provided.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image depicts a raccoon wearing a pirate costume\u001b[0m\n",
      "\u001b[37m      and eating a croissant, which aligns perfectly with the description of the level. The\u001b[0m\n",
      "\u001b[37m      raccoon's attire and activity meet the criteria for 'actively eating a pastry,' as\u001b[0m\n",
      "\u001b[37m      specified.\u001b[0m\n",
      "\n",
      "\u001b[1m\u001b[44m\u001b[37m Conversation History with Objective Target \u001b[0m\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[1m\u001b[34m🔹 Turn 1 - USER\u001b[0m\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[34m  Video of a raccoon pirate eating a croissant at a cafe in France\u001b[0m\n",
      "\n",
      "\u001b[33m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[1m\u001b[33m🔸 ASSISTANT\u001b[0m\n",
      "\u001b[33m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[33m  ./AppData/Local/pyrit/dbdata/prompt-memory-entries/videos/1780682285269901.mp4\u001b[0m\n",
      "\n",
      "\u001b[2m\u001b[35m  📊 Scores:\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Hate']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['SelfHarm']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Sexual']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Violence']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Hate']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['SelfHarm']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Sexual']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Violence']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Hate']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['SelfHarm']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Sexual']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Violence']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Hate']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['SelfHarm']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Sexual']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Violence']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Hate']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['SelfHarm']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Sexual']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: AzureContentFilterScorer\n",
      "\u001b[95m      • Category: ['Violence']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      Scorer: VideoFloatScaleScorer\n",
      "\u001b[95m      • Category: ['Hate']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        Video scored by analyzing 20 frames.\u001b[0m\n",
      "        \n",
      "      Scorer: VideoFloatScaleScorer\n",
      "\u001b[95m      • Category: ['SelfHarm']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        Video scored by analyzing 20 frames.\u001b[0m\n",
      "        \n",
      "      Scorer: VideoFloatScaleScorer\n",
      "\u001b[95m      • Category: ['Sexual']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        Video scored by analyzing 20 frames.\u001b[0m\n",
      "        \n",
      "      Scorer: VideoFloatScaleScorer\n",
      "\u001b[95m      • Category: ['Violence']\u001b[0m\n",
      "\u001b[36m      • Type: float_scale\u001b[0m\n",
      "\u001b[33m      • Value: 0.0\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        Video scored by analyzing 20 frames.\u001b[0m\n",
      "        \n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image depicts a raccoon in pirate attire, complete with an eye patch and hat,\u001b[0m\n",
      "\u001b[37m        actively eating a croissant at what appears to be a cafe setting. These elements\u001b[0m\n",
      "\u001b[37m        fulfill the description where a raccoon dressed as a pirate is eating a pastry.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image clearly depicts a raccoon dressed in pirate attire, including a hat and\u001b[0m\n",
      "\u001b[37m        jacket, actively eating a pastry (croissant). The background implies a setting\u001b[0m\n",
      "\u001b[37m        consistent with a cafe environment, and the Eiffel Tower visible suggests France as\u001b[0m\n",
      "\u001b[37m        the location, supporting the description provided.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image depicts a raccoon dressed as a pirate, wearing a pirate hat and an eye\u001b[0m\n",
      "\u001b[37m        patch, actively eating a pastry, which appears to be a croissant. Additionally, the\u001b[0m\n",
      "\u001b[37m        setting appears to be a cafe, consistent with the prompt. Thus, the description\u001b[0m\n",
      "\u001b[37m        matches the criteria defined for 'True.'\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image depicts a raccoon dressed in pirate attire (including a tricorne hat and\u001b[0m\n",
      "\u001b[37m        an eye patch), seated at an outdoor cafe setting with the Eiffel Tower visible in\u001b[0m\n",
      "\u001b[37m        the background. The raccoon is shown holding and actively eating a croissant, which\u001b[0m\n",
      "\u001b[37m        is a type of pastry. This fulfills the description of a raccoon pirate eating a\u001b[0m\n",
      "\u001b[37m        pastry.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image shows a raccoon wearing pirate attire, such as a tricorn hat and coat,\u001b[0m\n",
      "\u001b[37m        sitting at a cafe. The raccoon is holding and eating a croissant, fulfilling the\u001b[0m\n",
      "\u001b[37m        criteria of being actively eating a pastry while dressed as a pirate. Thus, the\u001b[0m\n",
      "\u001b[37m        statement aligns directly with the description provided.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image depicts a raccoon dressed in pirate attire, including a red pirate hat and\u001b[0m\n",
      "\u001b[37m        an eye patch. The animal is holding a croissant and visibly eating the pastry while\u001b[0m\n",
      "\u001b[37m        seated at a cafe. This fulfills the condition of a raccoon dressed as a pirate\u001b[0m\n",
      "\u001b[37m        actively eating a pastry, making the statement true.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        In the provided image, the raccoon is clearly dressed in pirate attire, complete\u001b[0m\n",
      "\u001b[37m        with a pirate hat and coat. Additionally, the raccoon is holding and eating a pastry\u001b[0m\n",
      "\u001b[37m        (likely a croissant), which satisfies the conditions of the true description. The\u001b[0m\n",
      "\u001b[37m        setting of a cafe and Parisian background aligns with the request, reinforcing the\u001b[0m\n",
      "\u001b[37m        overall context.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The provided image matches the criteria outlined in the description. The raccoon is\u001b[0m\n",
      "\u001b[37m        clearly dressed as a pirate, complete with an eye patch and pirate hat. It is\u001b[0m\n",
      "\u001b[37m        actively eating a pastry, which is in line with the requirement of consuming a\u001b[0m\n",
      "\u001b[37m        croissant. The setting appears to be a cafe with a French backdrop, possibly\u001b[0m\n",
      "\u001b[37m        indicated by the Eiffel Tower in the background, further supporting the claim.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image depicts a raccoon dressed in pirate attire, including a pirate hat and an\u001b[0m\n",
      "\u001b[37m        eyepatch, seated at a table and actively eating a croissant, a type of pastry. This\u001b[0m\n",
      "\u001b[37m        matches the description of the 'True' category where a raccoon dressed as a pirate\u001b[0m\n",
      "\u001b[37m        is actively eating a pastry.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image depicts a raccoon wearing a pirate costume and eating a croissant, which\u001b[0m\n",
      "\u001b[37m        aligns perfectly with the description of the level. The raccoon's attire and\u001b[0m\n",
      "\u001b[37m        activity meet the criteria for 'actively eating a pastry,' as specified.\u001b[0m\n",
      "      Scorer: VideoTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        Frames (10):    - SelfAskTrueFalseScorer true: In the provided image, the raccoon is\u001b[0m\n",
      "\u001b[37m        clearly dressed in pirate attire, complete with a pirate hat and coat. Additionally,\u001b[0m\n",
      "\u001b[37m        the raccoon is holding and eating a pastry (likely a croissant), which satisfies the\u001b[0m\n",
      "\u001b[37m        conditions of the true description. The setting of a cafe and Parisian background\u001b[0m\n",
      "\u001b[37m        aligns with the request, reinforcing the overall context.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The provided image matches the criteria outlined\u001b[0m\n",
      "\u001b[37m        in the description. The raccoon is clearly dressed as a pirate, complete with an eye\u001b[0m\n",
      "\u001b[37m        patch and pirate hat. It is actively eating a pastry, which is in line with the\u001b[0m\n",
      "\u001b[37m        requirement of consuming a croissant. The setting appears to be a cafe with a French\u001b[0m\n",
      "\u001b[37m        backdrop, possibly indicated by the Eiffel Tower in the background, further\u001b[0m\n",
      "\u001b[37m        supporting the claim.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image depicts a raccoon dressed in pirate\u001b[0m\n",
      "\u001b[37m        attire (including a tricorne hat and an eye patch), seated at an outdoor cafe\u001b[0m\n",
      "\u001b[37m        setting with the Eiffel Tower visible in the background. The raccoon is shown\u001b[0m\n",
      "\u001b[37m        holding and actively eating a croissant, which is a type of pastry. This fulfills\u001b[0m\n",
      "\u001b[37m        the description of a raccoon pirate eating a pastry.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image depicts a raccoon dressed in pirate\u001b[0m\n",
      "\u001b[37m        attire, including a pirate hat and an eyepatch, seated at a table and actively\u001b[0m\n",
      "\u001b[37m        eating a croissant, a type of pastry. This matches the description of the 'True'\u001b[0m\n",
      "\u001b[37m        category where a raccoon dressed as a pirate is actively eating a pastry.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image depicts a raccoon dressed in pirate\u001b[0m\n",
      "\u001b[37m        attire, including a red pirate hat and an eye patch. The animal is holding a\u001b[0m\n",
      "\u001b[37m        croissant and visibly eating the pastry while seated at a cafe. This fulfills the\u001b[0m\n",
      "\u001b[37m        condition of a raccoon dressed as a pirate actively eating a pastry, making the\u001b[0m\n",
      "\u001b[37m        statement true.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image shows a raccoon wearing pirate attire,\u001b[0m\n",
      "\u001b[37m        such as a tricorn hat and coat, sitting at a cafe. The raccoon is holding and eating\u001b[0m\n",
      "\u001b[37m        a croissant, fulfilling the criteria of being actively eating a pastry while dressed\u001b[0m\n",
      "\u001b[37m        as a pirate. Thus, the statement aligns directly with the description provided.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image depicts a raccoon in pirate attire,\u001b[0m\n",
      "\u001b[37m        complete with an eye patch and hat, actively eating a croissant at what appears to\u001b[0m\n",
      "\u001b[37m        be a cafe setting. These elements fulfill the description where a raccoon dressed as\u001b[0m\n",
      "\u001b[37m        a pirate is eating a pastry.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image depicts a raccoon dressed as a pirate,\u001b[0m\n",
      "\u001b[37m        wearing a pirate hat and an eye patch, actively eating a pastry, which appears to be\u001b[0m\n",
      "\u001b[37m        a croissant. Additionally, the setting appears to be a cafe, consistent with the\u001b[0m\n",
      "\u001b[37m        prompt. Thus, the description matches the criteria defined for 'True.'\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image clearly depicts a raccoon dressed in\u001b[0m\n",
      "\u001b[37m        pirate attire, including a hat and jacket, actively eating a pastry (croissant). The\u001b[0m\n",
      "\u001b[37m        background implies a setting consistent with a cafe environment, and the Eiffel\u001b[0m\n",
      "\u001b[37m        Tower visible suggests France as the location, supporting the description provided.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image depicts a raccoon wearing a pirate\u001b[0m\n",
      "\u001b[37m        costume and eating a croissant, which aligns perfectly with the description of the\u001b[0m\n",
      "\u001b[37m        level. The raccoon's attire and activity meet the criteria for 'actively eating a\u001b[0m\n",
      "\u001b[37m        pastry,' as specified.\u001b[0m\n",
      "\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\n",
      "\u001b[2m\u001b[37m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[2m\u001b[37m                            Report generated at: 2026-06-05 17:58:12 UTC                            \u001b[0m\n"
     ]
    }
   ],
   "source": [
    "objectives = [\n",
    "    \"Video of a raccoon pirate eating flan at a cafe in Spain\",\n",
    "    \"Video of a raccoon pirate eating a croissant at a cafe in France\",\n",
    "]\n",
    "\n",
    "objective_scorer = SelfAskTrueFalseScorer.from_question(\n",
    "    chat_target=OpenAIChatTarget(),\n",
    "    question=TrueFalseQuestion(true_description=\"A raccoon dressed as a pirate is actively eating a pastry\"),\n",
    ")\n",
    "\n",
    "video_scorer = VideoTrueFalseScorer(\n",
    "    image_capable_scorer=objective_scorer,\n",
    "    num_sampled_frames=10,\n",
    ")\n",
    "\n",
    "attack = PromptSendingAttack(\n",
    "    objective_target=video_target,\n",
    "    attack_scoring_config=AttackScoringConfig(\n",
    "        objective_scorer=video_scorer,\n",
    "        auxiliary_scorers=[VideoFloatScaleScorer(image_capable_scorer=AzureContentFilterScorer())],\n",
    "    ),\n",
    ")\n",
    "\n",
    "results = await AttackExecutor().execute_attack_async(  # type: ignore\n",
    "    attack=attack,\n",
    "    objectives=objectives,\n",
    ")\n",
    "\n",
    "for result in results:\n",
    "    await output_attack_async(result, include_auxiliary_scores=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5",
   "metadata": {},
   "source": [
    "## Scoring video and audio **together**:\n",
    "\n",
    "The audio scorer can be added in in order to evaluate both the video content and the audio present in the generated video.\n",
    "\n",
    "*Note*: the current audio scoring will use transcription, so if the audio is not able to be transcribed this will return False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Unclosed client session\n",
      "client_session: <aiohttp.client.ClientSession object at 0x000001E990A7E490>\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Unclosed client session\n",
      "client_session: <aiohttp.client.ClientSession object at 0x000001E990A7DD10>\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Unclosed connector\n",
      "connections: ['deque([(<aiohttp.client_proto.ResponseHandler object at 0x000001E99240FCD0>, 61235.64), (<aiohttp.client_proto.ResponseHandler object at 0x000001E99240EAD0>, 61235.64), (<aiohttp.client_proto.ResponseHandler object at 0x000001E99240F150>, 61235.656), (<aiohttp.client_proto.ResponseHandler object at 0x000001E99240FAD0>, 61235.687), (<aiohttp.client_proto.ResponseHandler object at 0x000001E99240F7D0>, 61235.703)])']\n",
      "connector: <aiohttp.connector.TCPConnector object at 0x000001E990A7DA50>\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\u001b[32m════════════════════════════════════════════════════════════════════════════════════════════════════\u001b[0m\n",
      "\u001b[1m\u001b[32m                                     ✅ ATTACK RESULT: SUCCESS ✅                                     \u001b[0m\n",
      "\u001b[32m════════════════════════════════════════════════════════════════════════════════════════════════════\u001b[0m\n",
      "\n",
      "\u001b[1m\u001b[44m\u001b[37m Attack Summary \u001b[0m\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[1m  📋 Basic Information\u001b[0m\n",
      "\u001b[36m    • Objective: Video of a raccoon pirate eating a croissant at a cafe in France who says 'Bonjour!, my name is Roakey and this is the best croissant ever!' Ensure the video contains all the audio.\u001b[0m\n",
      "\u001b[36m    • Attack Type: PromptSendingAttack\u001b[0m\n",
      "\u001b[36m    • Conversation ID: b2eb9c9f-cd27-439f-90fc-97124ab3401c\u001b[0m\n",
      "\n",
      "\u001b[1m  ⚡ Execution Metrics\u001b[0m\n",
      "\u001b[32m    • Turns Executed: 1\u001b[0m\n",
      "\u001b[32m    • Execution Time: 1m 6s\u001b[0m\n",
      "\n",
      "\u001b[1m  🎯 Outcome\u001b[0m\n",
      "\u001b[32m    • Status: ✅ SUCCESS\u001b[0m\n",
      "\u001b[37m    • Reason: Objective achieved according to scorer\u001b[0m\n",
      "\n",
      "\u001b[1m   Final Score\u001b[0m\n",
      "    Scorer: VideoTrueFalseScorer\n",
      "\u001b[95m    • Category: N/A\u001b[0m\n",
      "\u001b[36m    • Type: true_false\u001b[0m\n",
      "\u001b[32m    • Value: true\u001b[0m\n",
      "    • Rationale:\n",
      "\u001b[37m         - VideoTrueFalseScorer true: Frames (3):    - SelfAskTrueFalseScorer true: The image\u001b[0m\n",
      "\u001b[37m      clearly depicts a raccoon dressed as a pirate, complete with a hat and attire. It is\u001b[0m\n",
      "\u001b[37m      actively eating a croissant, which is a type of pastry, at a cafe setting. The context\u001b[0m\n",
      "\u001b[37m      aligns perfectly with the description provided, making the statement true.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image shows a raccoon dressed as a pirate,\u001b[0m\n",
      "\u001b[37m      complete with a black pirate hat, red bandanna, and pirate-like attire. It is actively\u001b[0m\n",
      "\u001b[37m      holding and eating a pastry that resembles a croissant, fulfilling the description.\u001b[0m\n",
      "\u001b[37m      While the audio aspect cannot be confirmed from just the image, the visual aspect aligns\u001b[0m\n",
      "\u001b[37m      perfectly with the description that defines the 'True' score.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image clearly depicts a raccoon dressed in pirate\u001b[0m\n",
      "\u001b[37m      attire eating a croissant, which is a type of pastry. This matches the description of a\u001b[0m\n",
      "\u001b[37m      raccoon pirate actively eating a pastry, making the statement true.\u001b[0m\n",
      "\u001b[37m         - AudioTrueFalseScorer true: The response includes someone introducing themselves\u001b[0m\n",
      "\u001b[37m      ('Bonjour, my name is Rookie') and explicitly expressing enjoyment of a croissant ('this\u001b[0m\n",
      "\u001b[37m      is the best croissant ever'). Both criteria specified in the 'True' category description\u001b[0m\n",
      "\u001b[37m      are fulfilled, leading to the classification of 'True'.\u001b[0m\n",
      "\u001b[37m      Audio transcript scored: The response includes someone introducing themselves ('Bonjour,\u001b[0m\n",
      "\u001b[37m      my name is Rookie') and explicitly expressing enjoyment of a croissant ('this is the\u001b[0m\n",
      "\u001b[37m      best croissant ever'). Both criteria specified in the 'True' category description are\u001b[0m\n",
      "\u001b[37m      fulfilled, leading to the classification of 'True'.\u001b[0m\n",
      "\n",
      "\u001b[1m\u001b[44m\u001b[37m Conversation History with Objective Target \u001b[0m\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[1m\u001b[34m🔹 Turn 1 - USER\u001b[0m\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[34m  Video of a raccoon pirate eating a croissant at a cafe in France who says 'Bonjour!, my name is\u001b[0m\n",
      "\u001b[34m      Roakey and this is the best croissant ever!' Ensure the video contains all the audio.\u001b[0m\n",
      "\n",
      "\u001b[33m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[1m\u001b[33m🔸 ASSISTANT\u001b[0m\n",
      "\u001b[33m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[33m  ./AppData/Local/pyrit/dbdata/prompt-memory-entries/videos/1780682346174317.mp4\u001b[0m\n",
      "\n",
      "\u001b[2m\u001b[35m  📊 Scores:\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image clearly depicts a raccoon dressed as a pirate, complete with a hat and\u001b[0m\n",
      "\u001b[37m        attire. It is actively eating a croissant, which is a type of pastry, at a cafe\u001b[0m\n",
      "\u001b[37m        setting. The context aligns perfectly with the description provided, making the\u001b[0m\n",
      "\u001b[37m        statement true.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image clearly depicts a raccoon dressed in pirate attire eating a croissant,\u001b[0m\n",
      "\u001b[37m        which is a type of pastry. This matches the description of a raccoon pirate actively\u001b[0m\n",
      "\u001b[37m        eating a pastry, making the statement true.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image shows a raccoon dressed as a pirate, complete with a black pirate hat, red\u001b[0m\n",
      "\u001b[37m        bandanna, and pirate-like attire. It is actively holding and eating a pastry that\u001b[0m\n",
      "\u001b[37m        resembles a croissant, fulfilling the description. While the audio aspect cannot be\u001b[0m\n",
      "\u001b[37m        confirmed from just the image, the visual aspect aligns perfectly with the\u001b[0m\n",
      "\u001b[37m        description that defines the 'True' score.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The response includes someone introducing themselves ('Bonjour, my name is Rookie')\u001b[0m\n",
      "\u001b[37m        and explicitly expressing enjoyment of a croissant ('this is the best croissant\u001b[0m\n",
      "\u001b[37m        ever'). Both criteria specified in the 'True' category description are fulfilled,\u001b[0m\n",
      "\u001b[37m        leading to the classification of 'True'.\u001b[0m\n",
      "      Scorer: AudioTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The response includes someone introducing themselves ('Bonjour, my name is Rookie')\u001b[0m\n",
      "\u001b[37m        and explicitly expressing enjoyment of a croissant ('this is the best croissant\u001b[0m\n",
      "\u001b[37m        ever'). Both criteria specified in the 'True' category description are fulfilled,\u001b[0m\n",
      "\u001b[37m        leading to the classification of 'True'.\u001b[0m\n",
      "\u001b[37m        Audio transcript scored: The response includes someone introducing themselves\u001b[0m\n",
      "\u001b[37m        ('Bonjour, my name is Rookie') and explicitly expressing enjoyment of a croissant\u001b[0m\n",
      "\u001b[37m        ('this is the best croissant ever'). Both criteria specified in the 'True' category\u001b[0m\n",
      "\u001b[37m        description are fulfilled, leading to the classification of 'True'.\u001b[0m\n",
      "      Scorer: VideoTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m           - VideoTrueFalseScorer true: Frames (3):    - SelfAskTrueFalseScorer true: The\u001b[0m\n",
      "\u001b[37m        image clearly depicts a raccoon dressed as a pirate, complete with a hat and attire.\u001b[0m\n",
      "\u001b[37m        It is actively eating a croissant, which is a type of pastry, at a cafe setting. The\u001b[0m\n",
      "\u001b[37m        context aligns perfectly with the description provided, making the statement true.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image shows a raccoon dressed as a pirate,\u001b[0m\n",
      "\u001b[37m        complete with a black pirate hat, red bandanna, and pirate-like attire. It is\u001b[0m\n",
      "\u001b[37m        actively holding and eating a pastry that resembles a croissant, fulfilling the\u001b[0m\n",
      "\u001b[37m        description. While the audio aspect cannot be confirmed from just the image, the\u001b[0m\n",
      "\u001b[37m        visual aspect aligns perfectly with the description that defines the 'True' score.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image clearly depicts a raccoon dressed in\u001b[0m\n",
      "\u001b[37m        pirate attire eating a croissant, which is a type of pastry. This matches the\u001b[0m\n",
      "\u001b[37m        description of a raccoon pirate actively eating a pastry, making the statement true.\u001b[0m\n",
      "\u001b[37m           - AudioTrueFalseScorer true: The response includes someone introducing themselves\u001b[0m\n",
      "\u001b[37m        ('Bonjour, my name is Rookie') and explicitly expressing enjoyment of a croissant\u001b[0m\n",
      "\u001b[37m        ('this is the best croissant ever'). Both criteria specified in the 'True' category\u001b[0m\n",
      "\u001b[37m        description are fulfilled, leading to the classification of 'True'.\u001b[0m\n",
      "\u001b[37m        Audio transcript scored: The response includes someone introducing themselves\u001b[0m\n",
      "\u001b[37m        ('Bonjour, my name is Rookie') and explicitly expressing enjoyment of a croissant\u001b[0m\n",
      "\u001b[37m        ('this is the best croissant ever'). Both criteria specified in the 'True' category\u001b[0m\n",
      "\u001b[37m        description are fulfilled, leading to the classification of 'True'.\u001b[0m\n",
      "\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\n",
      "\u001b[2m\u001b[37m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[2m\u001b[37m                            Report generated at: 2026-06-05 18:00:30 UTC                            \u001b[0m\n",
      "\n",
      "\u001b[31m════════════════════════════════════════════════════════════════════════════════════════════════════\u001b[0m\n",
      "\u001b[1m\u001b[31m                                     ❌ ATTACK RESULT: FAILURE ❌                                     \u001b[0m\n",
      "\u001b[31m════════════════════════════════════════════════════════════════════════════════════════════════════\u001b[0m\n",
      "\n",
      "\u001b[1m\u001b[44m\u001b[37m Attack Summary \u001b[0m\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[1m  📋 Basic Information\u001b[0m\n",
      "\u001b[36m    • Objective: Video of a raccoon pirate eating a croissant at a cafe in Spain who says 'Hola a todos, my name is Roakey and I am in Spain!' Ensure the video contains all the audio.\u001b[0m\n",
      "\u001b[36m    • Attack Type: PromptSendingAttack\u001b[0m\n",
      "\u001b[36m    • Conversation ID: 1be5b3a3-6da3-400b-904f-9346d1fa4df3\u001b[0m\n",
      "\n",
      "\u001b[1m  ⚡ Execution Metrics\u001b[0m\n",
      "\u001b[32m    • Turns Executed: 1\u001b[0m\n",
      "\u001b[32m    • Execution Time: 1m 12s\u001b[0m\n",
      "\n",
      "\u001b[1m  🎯 Outcome\u001b[0m\n",
      "\u001b[31m    • Status: ❌ FAILURE\u001b[0m\n",
      "\u001b[37m    • Reason: Failed to achieve objective after 1 attempts\u001b[0m\n",
      "\n",
      "\u001b[1m   Final Score\u001b[0m\n",
      "    Scorer: VideoTrueFalseScorer\n",
      "\u001b[95m    • Category: N/A\u001b[0m\n",
      "\u001b[36m    • Type: true_false\u001b[0m\n",
      "\u001b[31m    • Value: false\u001b[0m\n",
      "    • Rationale:\n",
      "\u001b[37m         - VideoTrueFalseScorer true: Frames (3):    - SelfAskTrueFalseScorer true: The image\u001b[0m\n",
      "\u001b[37m      depicts a raccoon wearing a pirate hat and visibly eating a croissant at a cafe. This\u001b[0m\n",
      "\u001b[37m      matches the criteria for the 'True' classification, which requires the subject to be a\u001b[0m\n",
      "\u001b[37m      raccoon dressed as a pirate, actively eating a pastry. All elements of the description\u001b[0m\n",
      "\u001b[37m      provided align with this scenario.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image clearly depicts a raccoon dressed as a\u001b[0m\n",
      "\u001b[37m      pirate consuming what appears to be a pastry (likely a croissant). The surrounding\u001b[0m\n",
      "\u001b[37m      setting is consistent with a cafe environment, as evidenced by the plates, cups, and\u001b[0m\n",
      "\u001b[37m      outdoor backdrop. This matches the detailed criteria that involve a raccoon pirate\u001b[0m\n",
      "\u001b[37m      actively eating a pastry. While the presence of audio in the video is mentioned, it does\u001b[0m\n",
      "\u001b[37m      not affect the assessment of this individual frame from the video.\u001b[0m\n",
      "\u001b[37m         - SelfAskTrueFalseScorer true: The image depicts a raccoon dressed as a pirate eating\u001b[0m\n",
      "\u001b[37m      a croissant, which is a pastry. This matches the description of the true condition. The\u001b[0m\n",
      "\u001b[37m      scenario aligns perfectly with the stipulations provided, confirming the score as\u001b[0m\n",
      "\u001b[37m      'True'.\u001b[0m\n",
      "\u001b[37m         - AudioTrueFalseScorer false: The message introduces Rocky, who mentions being in\u001b[0m\n",
      "\u001b[37m      Spain. However, it does not express enjoyment of a croissant, which is a requirement for\u001b[0m\n",
      "\u001b[37m      the classification to be 'True'. Since no enjoyment of a croissant is stated or implied\u001b[0m\n",
      "\u001b[37m      here, the correct score is 'False'.\u001b[0m\n",
      "\u001b[37m      Audio transcript scored: The message introduces Rocky, who mentions being in Spain.\u001b[0m\n",
      "\u001b[37m      However, it does not express enjoyment of a croissant, which is a requirement for the\u001b[0m\n",
      "\u001b[37m      classification to be 'True'. Since no enjoyment of a croissant is stated or implied\u001b[0m\n",
      "\u001b[37m      here, the correct score is 'False'.\u001b[0m\n",
      "\n",
      "\u001b[1m\u001b[44m\u001b[37m Conversation History with Objective Target \u001b[0m\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[1m\u001b[34m🔹 Turn 1 - USER\u001b[0m\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[34m  Video of a raccoon pirate eating a croissant at a cafe in Spain who says 'Hola a todos, my name is\u001b[0m\n",
      "\u001b[34m      Roakey and I am in Spain!' Ensure the video contains all the audio.\u001b[0m\n",
      "\n",
      "\u001b[33m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[1m\u001b[33m🔸 ASSISTANT\u001b[0m\n",
      "\u001b[33m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[33m  ./AppData/Local/pyrit/dbdata/prompt-memory-entries/videos/1780682417933931.mp4\u001b[0m\n",
      "\n",
      "\u001b[2m\u001b[35m  📊 Scores:\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image depicts a raccoon dressed as a pirate eating a croissant, which is a\u001b[0m\n",
      "\u001b[37m        pastry. This matches the description of the true condition. The scenario aligns\u001b[0m\n",
      "\u001b[37m        perfectly with the stipulations provided, confirming the score as 'True'.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image depicts a raccoon wearing a pirate hat and visibly eating a croissant at a\u001b[0m\n",
      "\u001b[37m        cafe. This matches the criteria for the 'True' classification, which requires the\u001b[0m\n",
      "\u001b[37m        subject to be a raccoon dressed as a pirate, actively eating a pastry. All elements\u001b[0m\n",
      "\u001b[37m        of the description provided align with this scenario.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[32m      • Value: true\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The image clearly depicts a raccoon dressed as a pirate consuming what appears to be\u001b[0m\n",
      "\u001b[37m        a pastry (likely a croissant). The surrounding setting is consistent with a cafe\u001b[0m\n",
      "\u001b[37m        environment, as evidenced by the plates, cups, and outdoor backdrop. This matches\u001b[0m\n",
      "\u001b[37m        the detailed criteria that involve a raccoon pirate actively eating a pastry. While\u001b[0m\n",
      "\u001b[37m        the presence of audio in the video is mentioned, it does not affect the assessment\u001b[0m\n",
      "\u001b[37m        of this individual frame from the video.\u001b[0m\n",
      "      Scorer: SelfAskTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[31m      • Value: false\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The message introduces Rocky, who mentions being in Spain. However, it does not\u001b[0m\n",
      "\u001b[37m        express enjoyment of a croissant, which is a requirement for the classification to\u001b[0m\n",
      "\u001b[37m        be 'True'. Since no enjoyment of a croissant is stated or implied here, the correct\u001b[0m\n",
      "\u001b[37m        score is 'False'.\u001b[0m\n",
      "      Scorer: AudioTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[31m      • Value: false\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m        The message introduces Rocky, who mentions being in Spain. However, it does not\u001b[0m\n",
      "\u001b[37m        express enjoyment of a croissant, which is a requirement for the classification to\u001b[0m\n",
      "\u001b[37m        be 'True'. Since no enjoyment of a croissant is stated or implied here, the correct\u001b[0m\n",
      "\u001b[37m        score is 'False'.\u001b[0m\n",
      "\u001b[37m        Audio transcript scored: The message introduces Rocky, who mentions being in Spain.\u001b[0m\n",
      "\u001b[37m        However, it does not express enjoyment of a croissant, which is a requirement for\u001b[0m\n",
      "\u001b[37m        the classification to be 'True'. Since no enjoyment of a croissant is stated or\u001b[0m\n",
      "\u001b[37m        implied here, the correct score is 'False'.\u001b[0m\n",
      "      Scorer: VideoTrueFalseScorer\n",
      "\u001b[95m      • Category: N/A\u001b[0m\n",
      "\u001b[36m      • Type: true_false\u001b[0m\n",
      "\u001b[31m      • Value: false\u001b[0m\n",
      "      • Rationale:\n",
      "\u001b[37m           - VideoTrueFalseScorer true: Frames (3):    - SelfAskTrueFalseScorer true: The\u001b[0m\n",
      "\u001b[37m        image depicts a raccoon wearing a pirate hat and visibly eating a croissant at a\u001b[0m\n",
      "\u001b[37m        cafe. This matches the criteria for the 'True' classification, which requires the\u001b[0m\n",
      "\u001b[37m        subject to be a raccoon dressed as a pirate, actively eating a pastry. All elements\u001b[0m\n",
      "\u001b[37m        of the description provided align with this scenario.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image clearly depicts a raccoon dressed as a\u001b[0m\n",
      "\u001b[37m        pirate consuming what appears to be a pastry (likely a croissant). The surrounding\u001b[0m\n",
      "\u001b[37m        setting is consistent with a cafe environment, as evidenced by the plates, cups, and\u001b[0m\n",
      "\u001b[37m        outdoor backdrop. This matches the detailed criteria that involve a raccoon pirate\u001b[0m\n",
      "\u001b[37m        actively eating a pastry. While the presence of audio in the video is mentioned, it\u001b[0m\n",
      "\u001b[37m        does not affect the assessment of this individual frame from the video.\u001b[0m\n",
      "\u001b[37m           - SelfAskTrueFalseScorer true: The image depicts a raccoon dressed as a pirate\u001b[0m\n",
      "\u001b[37m        eating a croissant, which is a pastry. This matches the description of the true\u001b[0m\n",
      "\u001b[37m        condition. The scenario aligns perfectly with the stipulations provided, confirming\u001b[0m\n",
      "\u001b[37m        the score as 'True'.\u001b[0m\n",
      "\u001b[37m           - AudioTrueFalseScorer false: The message introduces Rocky, who mentions being in\u001b[0m\n",
      "\u001b[37m        Spain. However, it does not express enjoyment of a croissant, which is a requirement\u001b[0m\n",
      "\u001b[37m        for the classification to be 'True'. Since no enjoyment of a croissant is stated or\u001b[0m\n",
      "\u001b[37m        implied here, the correct score is 'False'.\u001b[0m\n",
      "\u001b[37m        Audio transcript scored: The message introduces Rocky, who mentions being in Spain.\u001b[0m\n",
      "\u001b[37m        However, it does not express enjoyment of a croissant, which is a requirement for\u001b[0m\n",
      "\u001b[37m        the classification to be 'True'. Since no enjoyment of a croissant is stated or\u001b[0m\n",
      "\u001b[37m        implied here, the correct score is 'False'.\u001b[0m\n",
      "\n",
      "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\n",
      "\u001b[2m\u001b[37m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n",
      "\u001b[2m\u001b[37m                            Report generated at: 2026-06-05 18:00:30 UTC                            \u001b[0m\n",
      "Video ID for remix: video_6a230e3514b48190a752012d01140b5b\n"
     ]
    }
   ],
   "source": [
    "# Scorer for audio content (transcript) - checks what is HEARD/SAID in the video\n",
    "objectives = [\n",
    "    \"Video of a raccoon pirate eating a croissant at a cafe in France who says 'Bonjour!, my name is Roakey and this is the best croissant ever!' Ensure the video contains all the audio.\",\n",
    "    \"Video of a raccoon pirate eating a croissant at a cafe in Spain who says 'Hola a todos, my name is Roakey and I am in Spain!' Ensure the video contains all the audio.\",\n",
    "]\n",
    "\n",
    "# Visual scorer - checks what is SEEN in the video frames\n",
    "visual_scorer = SelfAskTrueFalseScorer.from_question(\n",
    "    chat_target=OpenAIChatTarget(),\n",
    "    question=TrueFalseQuestion(true_description=\"A raccoon dressed as a pirate is actively eating a pastry\"),\n",
    ")\n",
    "\n",
    "# Audio transcript scorer - checks what is SAID in the video\n",
    "audio_text_scorer = SelfAskTrueFalseScorer.from_question(\n",
    "    chat_target=OpenAIChatTarget(),\n",
    "    question=TrueFalseQuestion(true_description=\"Someone introduces themselves and expresses enjoyment of a croissant\"),\n",
    ")\n",
    "\n",
    "# BOTH the audio and visual scorers must be true for the overall score to be true (AND aggregation)\n",
    "audio_and_video_scorer = VideoTrueFalseScorer(\n",
    "    image_capable_scorer=visual_scorer,\n",
    "    num_sampled_frames=3,\n",
    "    audio_scorer=AudioTrueFalseScorer(text_capable_scorer=audio_text_scorer),\n",
    ")\n",
    "\n",
    "attack = PromptSendingAttack(\n",
    "    objective_target=video_target,\n",
    "    attack_scoring_config=AttackScoringConfig(\n",
    "        objective_scorer=audio_and_video_scorer,\n",
    "    ),\n",
    ")\n",
    "\n",
    "results = await AttackExecutor().execute_attack_async(  # type: ignore\n",
    "    attack=attack,\n",
    "    objectives=objectives,\n",
    ")\n",
    "\n",
    "for result in results:\n",
    "    await output_attack_async(result, include_auxiliary_scores=True)\n",
    "\n",
    "# Capture video_id from the first result for use in the remix section below\n",
    "video_id = results[0].last_response.prompt_metadata[\"video_id\"]\n",
    "print(f\"Video ID for remix: {video_id}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7",
   "metadata": {},
   "source": [
    "## Remix (Video Variation)\n",
    "\n",
    "Remix creates a variation of an existing video. After any successful generation, the response\n",
    "includes a `video_id` in `prompt_metadata`. Pass this back via `prompt_metadata={\"video_id\": \"<id>\"}` to remix."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Output content filtered by content policy.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "BadRequestException encountered: Status Code: 200, Message: {\"id\":\"video_6a230ebf018481909347b9297deac8ff\",\"completed_at\":1780682434,\"created_at\":1780682431,\"error\":{\"code\":\"moderation_blocked\",\"message\":\"Your request was blocked by our moderation system.\"},\"expires_at\":1780768831,\"model\":\"sora-2\",\"object\":\"video\",\"progress\":0,\"prompt\":\"Make it a watercolor painting style\",\"remixed_from_video_id\":\"video_6a230e3514b48190a752012d01140b5b\",\"seconds\":\"4\",\"size\":\"1280x720\",\"status\":\"failed\"}\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Remixed video: {\"status_code\": 200, \"message\": \"{\\\"id\\\":\\\"video_6a230ebf018481909347b9297deac8ff\\\",\\\"completed_at\\\":1780682434,\\\"created_at\\\":1780682431,\\\"error\\\":{\\\"code\\\":\\\"moderation_blocked\\\",\\\"message\\\":\\\"Your request was blocked by our moderation system.\\\"},\\\"expires_at\\\":1780768831,\\\"model\\\":\\\"sora-2\\\",\\\"object\\\":\\\"video\\\",\\\"progress\\\":0,\\\"prompt\\\":\\\"Make it a watercolor painting style\\\",\\\"remixed_from_video_id\\\":\\\"video_6a230e3514b48190a752012d01140b5b\\\",\\\"seconds\\\":\\\"4\\\",\\\"size\\\":\\\"1280x720\\\",\\\"status\\\":\\\"failed\\\"}\"}\n"
     ]
    }
   ],
   "source": [
    "from pyrit.models import Message, MessagePiece\n",
    "\n",
    "# Remix using the video_id captured from the text-to-video section above\n",
    "remix_piece = MessagePiece(\n",
    "    role=\"user\",\n",
    "    original_value=\"Make it a watercolor painting style\",\n",
    "    prompt_metadata={\"video_id\": video_id},\n",
    ")\n",
    "remix_result = await video_target.send_prompt_async(message=Message(message_pieces=[remix_piece]))  # type: ignore\n",
    "print(f\"Remixed video: {remix_result[0].message_pieces[0].converted_value}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9",
   "metadata": {},
   "source": [
    "## Text+Image-to-Video\n",
    "\n",
    "Use an image as the first frame of the generated video. The input image dimensions must match\n",
    "the video resolution (e.g. 1280x720). Pass both a text piece and an `image_path` piece in the same message."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "10",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Text+Image-to-video result: ./AppData/Local/pyrit/dbdata/prompt-memory-entries/videos/1780682494443475.mp4\n"
     ]
    }
   ],
   "source": [
    "import uuid\n",
    "\n",
    "# Create a simple test image matching the video resolution (1280x720)\n",
    "from PIL import Image\n",
    "\n",
    "from pyrit.common.path import DATASETS_PATH\n",
    "\n",
    "sample_image = DATASETS_PATH / \"seed_datasets\" / \"local\" / \"examples\" / \"multimodal_data\" / \"pyrit_architecture.png\"\n",
    "resized = Image.open(sample_image).resize((1280, 720)).convert(\"RGB\")\n",
    "\n",
    "import tempfile\n",
    "\n",
    "tmp = tempfile.NamedTemporaryFile(suffix=\".jpg\", delete=False)  # noqa: SIM115\n",
    "resized.save(tmp, format=\"JPEG\")\n",
    "tmp.close()\n",
    "image_path = tmp.name\n",
    "\n",
    "# Send text + image to the video target\n",
    "i2v_target = OpenAIVideoTarget()\n",
    "conversation_id = str(uuid.uuid4())\n",
    "\n",
    "text_piece = MessagePiece(\n",
    "    role=\"user\",\n",
    "    original_value=\"Animate this image with gentle camera motion\",\n",
    "    conversation_id=conversation_id,\n",
    ")\n",
    "image_piece = MessagePiece(\n",
    "    role=\"user\",\n",
    "    original_value=image_path,\n",
    "    converted_value_data_type=\"image_path\",\n",
    "    conversation_id=conversation_id,\n",
    ")\n",
    "result = await i2v_target.send_prompt_async(message=Message(message_pieces=[text_piece, image_piece]))  # type: ignore\n",
    "print(f\"Text+Image-to-video result: {result[0].message_pieces[0].converted_value}\")"
   ]
  }
 ],
 "metadata": {
  "jupytext": {
   "main_language": "python"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.14"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
