|
40 | 40 | "\u001b[33m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n", |
41 | 41 | "\u001b[1m\u001b[33m🔸 ASSISTANT\u001b[0m\n", |
42 | 42 | "\u001b[33m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n", |
43 | | - "\u001b[33m Why did the scarecrow win an award?\u001b[0m\n", |
44 | | - "\u001b[33m Because he was outstanding in his field!\u001b[0m\n", |
| 43 | + "\u001b[33m Why don’t scientists trust atoms?\u001b[0m\n", |
| 44 | + "\u001b[33m Because they make up everything!\u001b[0m\n", |
45 | 45 | "\n", |
46 | 46 | "\u001b[34m────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n" |
47 | 47 | ] |
|
185 | 185 | "name": "stdout", |
186 | 186 | "output_type": "stream", |
187 | 187 | "text": [ |
188 | | - "2 | assistant: {\"id\":\"ws_68b78ebf92b481a299ee79eda74c5ae80cc9740a19fd8e2f\",\"type\":\"web_search_call\",\"status\":\"completed\",\"action\":{\"type\":\"search\",\"query\":\"positive news September 3 2025\"}}\n", |
189 | | - "4 | assistant: {\"id\":\"ws_68b78ec2147081a2b2078a9bcda00f9e0cc9740a19fd8e2f\",\"type\":\"web_search_call\",\"status\":\"completed\",\"action\":{\"type\":\"open_page\",\"url\":\"https://newsroom.ocfl.net/media-advisories/press-releases/2025/09/a-spontaneous-sale-for-a-happy-tail-orange-county-animal-services-reduced-adoption-fees-for-three-days/\"}}\n", |
190 | | - "6 | assistant: {\"id\":\"ws_68b78ec4823881a2a18c0ed68897d5fd0cc9740a19fd8e2f\",\"type\":\"web_search_call\",\"status\":\"completed\",\"action\":{\"type\":\"search\",\"query\":\"site:apnews.com good news September 3 2025\"}}\n", |
191 | | - "8 | assistant: {\"id\":\"ws_68b78ec7107081a28908f0f4997dfc5c0cc9740a19fd8e2f\",\"type\":\"web_search_call\",\"status\":\"completed\",\"action\":{\"type\":\"search\",\"query\":\"AP News One Good Thing September 3 2025\"}}\n", |
192 | | - "10 | assistant: {\"id\":\"ws_68b78ec99cb881a28420fdd84cf98b540cc9740a19fd8e2f\",\"type\":\"web_search_call\",\"status\":\"completed\",\"action\":{\"type\":\"open_page\",\"url\":\"https://apnews.com/article/biden-charleston-west-virginia-715c1faa116d4285c77f0095d37a714a\"}}\n", |
193 | | - "12 | assistant: {\"id\":\"ws_68b78ecb17a481a2a08b8d38954539580cc9740a19fd8e2f\",\"type\":\"web_search_call\",\"status\":\"completed\",\"action\":{\"type\":\"find_in_page\",\"pattern\":\"South Charleston\"}}\n", |
194 | | - "14 | assistant: {\"id\":\"ws_68b78ece497081a2a6633cdd4403ddcb0cc9740a19fd8e2f\",\"type\":\"web_search_call\",\"status\":\"completed\",\"action\":{\"type\":\"search\",\"query\":\"West Virginia electric school buses plant September Charleston GreenPower Motor Co. AP News\"}}\n", |
195 | | - "16 | assistant: A Canadian electric-school-bus manufacturer, GreenPower Motor Co., will begin producing zero-emission buses at its new South Charleston, West Virginia, facility in September, Gov. Jim Justice announced today. The 9.5-acre plant will initially create about 200 jobs, with the capacity to expand to roughly 900 positions once full production is reached in two years ([apnews.com](https://apnews.com/article/biden-charleston-west-virginia-715c1faa116d4285c77f0095d37a714a?utm_source=openai)).\n", |
196 | | - "\n", |
197 | | - "This expansion is supported by President Biden’s $1 trillion infrastructure law, under which the Environmental Protection Agency’s Clean School Bus Program offers rebates of up to $375,000 for larger electric buses and $285,000 for smaller models, plus an extra $20,000 per bus to fund charging infrastructure. GreenPower plans to leverage these rebates to help school districts transition away from diesel-powered fleets, with buses capable of 140 miles on a single charge and a recharge time as short as 3.5 hours ([apnews.com](https://apnews.com/article/biden-charleston-west-virginia-715c1faa116d4285c77f0095d37a714a?utm_source=openai)).\n", |
198 | | - "\n", |
199 | | - "This development represents a win on multiple fronts: it accelerates the shift toward cleaner school transportation, reduces local air pollution, and brings significant employment opportunities to the Charleston area—all announced on September 3, 2025.\n" |
| 188 | + "1 | assistant: {\"id\":\"ws_0db630c93406f5080068e5e961dad481a28a31d658c8353572\",\"type\":\"web_search_call\",\"status\":\"completed\",\"action\":{\"type\":\"search\",\"query\":\"October 8 2025 positive news story\"}}\n", |
| 189 | + "3 | assistant: {\"id\":\"ws_0db630c93406f5080068e5e964e01481a29e827eea62d80001\",\"type\":\"web_search_call\",\"status\":\"completed\",\"action\":{\"type\":\"search\",\"query\":\"Reuters Oct 8 2025 positive news climate education health\"}}\n", |
| 190 | + "5 | assistant: {\"id\":\"ws_0db630c93406f5080068e5e9685ff481a2910eecac2a26c206\",\"type\":\"web_search_call\",\"status\":\"completed\",\"action\":{\"type\":\"search\",\"query\":\"Date Wed Oct 8 2025 Reuters positive\"}}\n", |
| 191 | + "7 | assistant: {\"id\":\"ws_0db630c93406f5080068e5e96b262481a28862db6b0394e644\",\"type\":\"web_search_call\",\"status\":\"completed\",\"action\":{\"type\":\"search\",\"query\":\"AP News October 8 2025 positive news\"}}\n", |
| 192 | + "9 | assistant: {\"id\":\"ws_0db630c93406f5080068e5e96fa97c81a2b48a8f6c93125190\",\"type\":\"web_search_call\",\"status\":\"completed\",\"action\":{\"type\":\"search\",\"query\":\"Reuters Oct 8 2025 children school Africa positive Reuters 2025-10-08\"}}\n", |
| 193 | + "11 | assistant: {\"id\":\"ws_0db630c93406f5080068e5e972624481a2b08b4104a6adb6e8\",\"type\":\"web_search_call\",\"status\":\"completed\",\"action\":{\"type\":\"search\",\"query\":\"Oct 8 2025 Reuters environment ban polystyrene local positive\"}}\n", |
| 194 | + "13 | assistant: One uplifting story today comes from Bangladesh’s flood-prone heartland, where solar-powered “floating schools” are keeping education afloat. As seasonal inundations submerge roads and isolate villages, boat-based classrooms stocked with books and staffed by teachers sail directly to students’ doorsteps, ensuring that hundreds of children like 10-year-old Safikul Islam don’t miss a day of learning despite rising waters ([reuters.com](https://www.reuters.com/world/asia-pacific/bangladeshs-flooded-plains-schools-boats-keep-learning-afloat-2025-10-07/?utm_source=openai))\n" |
200 | 195 | ] |
201 | 196 | } |
202 | 197 | ], |
203 | 198 | "source": [ |
| 199 | + "import os\n", |
| 200 | + "\n", |
204 | 201 | "from pyrit.common import IN_MEMORY, initialize_pyrit\n", |
205 | 202 | "from pyrit.common.tool_configs import web_search_tool\n", |
206 | 203 | "from pyrit.models import PromptRequestPiece, PromptRequestResponse\n", |
|
209 | 206 | "initialize_pyrit(memory_db_type=IN_MEMORY)\n", |
210 | 207 | "\n", |
211 | 208 | "target = OpenAIResponseTarget(\n", |
| 209 | + " endpoint=os.getenv(\"PLATFORM_OPENAI_RESPONSES_ENDPOINT\"),\n", |
| 210 | + " api_key=os.getenv(\"PLATFORM_OPENAI_RESPONSES_KEY\"),\n", |
| 211 | + " model_name=os.getenv(\"PLATFORM_OPENAI_RESPONSES_MODEL\", \"gpt-4o-mini\"),\n", |
| 212 | + " api_version=None,\n", |
212 | 213 | " extra_body_parameters={\n", |
213 | 214 | " \"tools\": [web_search_tool()],\n", |
214 | 215 | " \"tool_choice\": \"auto\",\n", |
|
242 | 243 | "name": "python", |
243 | 244 | "nbconvert_exporter": "python", |
244 | 245 | "pygments_lexer": "ipython3", |
245 | | - "version": "3.11.9" |
| 246 | + "version": "3.12.11" |
246 | 247 | } |
247 | 248 | }, |
248 | 249 | "nbformat": 4, |
|
0 commit comments