|
35 | 35 | "name": "stdout", |
36 | 36 | "output_type": "stream", |
37 | 37 | "text": [ |
38 | | - "{'__type__': 'TextTarget', '__module__': 'pyrit.prompt_target.text_target'}: user: /workspace/dbdata/prompt-memory-entries/urls/1761596318711065.pdf\n" |
| 38 | + "{'__type__': 'TextTarget', '__module__': 'pyrit.prompt_target.text_target'}: user: C:\\git\\pyrit2\\PyRIT\\dbdata\\prompt-memory-entries\\urls\\1764136202221926.pdf\n" |
39 | 39 | ] |
40 | 40 | }, |
41 | 41 | { |
42 | 42 | "name": "stderr", |
43 | 43 | "output_type": "stream", |
44 | 44 | "text": [ |
45 | | - "[PromptSendingAttack (ID: 075ff944)] No response received on attempt 1 (likely filtered)\n" |
| 45 | + "[PromptSendingAttack (ID: e208ce53)] No response received on attempt 1 (likely filtered)\n" |
46 | 46 | ] |
47 | 47 | }, |
48 | 48 | { |
|
59 | 59 | "\u001b[37m coffee', 'applicant_name': 'John Smith'}\u001b[0m\n", |
60 | 60 | "\n", |
61 | 61 | "\u001b[36m Converted:\u001b[0m\n", |
62 | | - "\u001b[37m /workspace/dbdata/prompt-memory-entries/urls/1761596318711065.pdf\u001b[0m\n", |
| 62 | + "\u001b[37m C:\\git\\pyrit2\\PyRIT\\dbdata\\prompt-memory-entries\\urls\\1764136202221926.pdf\u001b[0m\n", |
63 | 63 | "\n", |
64 | 64 | "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n" |
65 | 65 | ] |
|
68 | 68 | "source": [ |
69 | 69 | "import pathlib\n", |
70 | 70 | "\n", |
71 | | - "from pyrit.common.path import DATASETS_PATH\n", |
| 71 | + "from pyrit.common.path import CONVERTER_SEED_PROMPT_PATH\n", |
72 | 72 | "from pyrit.executor.attack import (\n", |
73 | 73 | " AttackConverterConfig,\n", |
74 | 74 | " ConsoleAttackResultPrinter,\n", |
|
92 | 92 | "\n", |
93 | 93 | "# Load the YAML template for the PDF generation\n", |
94 | 94 | "template_path = (\n", |
95 | | - " pathlib.Path(DATASETS_PATH) / \"prompt_converters\" / \"pdf_converters\" / \"red_teaming_application_template.yaml\"\n", |
| 95 | + " pathlib.Path(CONVERTER_SEED_PROMPT_PATH) / \"pdf_converters\" / \"red_teaming_application_template.yaml\"\n", |
96 | 96 | ")\n", |
97 | 97 | "if not template_path.exists():\n", |
98 | 98 | " raise FileNotFoundError(f\"Template file not found: {template_path}\")\n", |
|
151 | 151 | "name": "stdout", |
152 | 152 | "output_type": "stream", |
153 | 153 | "text": [ |
154 | | - "{'__type__': 'TextTarget', '__module__': 'pyrit.prompt_target.text_target'}: user: /workspace/dbdata/prompt-memory-entries/urls/1761600511348011.pdf\n" |
| 154 | + "{'__type__': 'TextTarget', '__module__': 'pyrit.prompt_target.text_target'}: user: C:\\git\\pyrit2\\PyRIT\\dbdata\\prompt-memory-entries\\urls\\1764136208011709.pdf\n" |
155 | 155 | ] |
156 | 156 | }, |
157 | 157 | { |
158 | 158 | "name": "stderr", |
159 | 159 | "output_type": "stream", |
160 | 160 | "text": [ |
161 | | - "[PromptSendingAttack (ID: 45e822c2)] No response received on attempt 1 (likely filtered)\n" |
| 161 | + "[PromptSendingAttack (ID: ef9d3df7)] No response received on attempt 1 (likely filtered)\n" |
162 | 162 | ] |
163 | 163 | }, |
164 | 164 | { |
|
173 | 173 | "\u001b[37m This is a simple test string for PDF generation. No templates here!\u001b[0m\n", |
174 | 174 | "\n", |
175 | 175 | "\u001b[36m Converted:\u001b[0m\n", |
176 | | - "\u001b[37m /workspace/dbdata/prompt-memory-entries/urls/1761600511348011.pdf\u001b[0m\n", |
| 176 | + "\u001b[37m C:\\git\\pyrit2\\PyRIT\\dbdata\\prompt-memory-entries\\urls\\1764136208011709.pdf\u001b[0m\n", |
177 | 177 | "\n", |
178 | 178 | "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n" |
179 | 179 | ] |
|
233 | 233 | "name": "stdout", |
234 | 234 | "output_type": "stream", |
235 | 235 | "text": [ |
236 | | - "[21:29:10][402][ai-red-team][INFO][Processing page 0 with 2 injection items.]\n", |
237 | | - "[21:29:10][422][ai-red-team][INFO][Processing page 1 with 2 injection items.]\n", |
238 | | - "[21:29:10][426][ai-red-team][INFO][Processing page 2 with 2 injection items.]\n", |
239 | | - "{'__type__': 'TextTarget', '__module__': 'pyrit.prompt_target.text_target'}: user: /workspace/dbdata/prompt-memory-entries/urls/1761600550429110.pdf\n" |
| 236 | + "[21:53:56][893][ai-red-team][INFO][Processing page 0 with 2 injection items.]\n", |
| 237 | + "[21:53:56][898][ai-red-team][INFO][Processing page 1 with 2 injection items.]\n", |
| 238 | + "[21:53:56][901][ai-red-team][INFO][Processing page 2 with 2 injection items.]\n", |
| 239 | + "{'__type__': 'TextTarget', '__module__': 'pyrit.prompt_target.text_target'}: user: C:\\git\\pyrit2\\PyRIT\\dbdata\\prompt-memory-entries\\urls\\1764136436903484.pdf\n" |
240 | 240 | ] |
241 | 241 | }, |
242 | 242 | { |
243 | 243 | "name": "stderr", |
244 | 244 | "output_type": "stream", |
245 | 245 | "text": [ |
246 | | - "[PromptSendingAttack (ID: e08852bc)] No response received on attempt 1 (likely filtered)\n" |
| 246 | + "[PromptSendingAttack (ID: bb7d21e1)] No response received on attempt 1 (likely filtered)\n" |
247 | 247 | ] |
248 | 248 | }, |
249 | 249 | { |
|
258 | 258 | "\u001b[37m This is a simple test string for PDF generation. No templates here!\u001b[0m\n", |
259 | 259 | "\n", |
260 | 260 | "\u001b[36m Converted:\u001b[0m\n", |
261 | | - "\u001b[37m /workspace/dbdata/prompt-memory-entries/urls/1761600550429110.pdf\u001b[0m\n", |
| 261 | + "\u001b[37m C:\\git\\pyrit2\\PyRIT\\dbdata\\prompt-memory-entries\\urls\\1764136436903484.pdf\u001b[0m\n", |
262 | 262 | "\n", |
263 | 263 | "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n" |
264 | 264 | ] |
|
341 | 341 | "result = await attack.execute_async(objective=prompt) # type: ignore\n", |
342 | 342 | "await ConsoleAttackResultPrinter().print_conversation_async(result=result) # type: ignore" |
343 | 343 | ] |
344 | | - }, |
345 | | - { |
346 | | - "cell_type": "code", |
347 | | - "execution_count": null, |
348 | | - "id": "6", |
349 | | - "metadata": {}, |
350 | | - "outputs": [], |
351 | | - "source": [] |
352 | 344 | } |
353 | 345 | ], |
354 | 346 | "metadata": { |
355 | 347 | "jupytext": { |
356 | | - "cell_metadata_filter": "-all" |
| 348 | + "cell_metadata_filter": "-all", |
| 349 | + "main_language": "python" |
357 | 350 | }, |
358 | 351 | "language_info": { |
359 | 352 | "codemirror_mode": { |
|
365 | 358 | "name": "python", |
366 | 359 | "nbconvert_exporter": "python", |
367 | 360 | "pygments_lexer": "ipython3", |
368 | | - "version": "3.11.13" |
| 361 | + "version": "3.12.12" |
369 | 362 | } |
370 | 363 | }, |
371 | 364 | "nbformat": 4, |
|
0 commit comments