Skip to content

Examples and guides for using the OpenAI API

Fix Bedrock notebook output contrast in dark mode (#3224)

Dan Pieta8132ca2f7a5
diff --git a/examples/partners/AWS/openai_models_with_amazon_bedrock.ipynb b/examples/partners/AWS/openai_models_with_amazon_bedrock.ipynb
index 1b59df8d..48152c2d 100644
--- a/examples/partners/AWS/openai_models_with_amazon_bedrock.ipynb
+++ b/examples/partners/AWS/openai_models_with_amazon_bedrock.ipynb
@@ -564,7 +564,7 @@
"def warn_or_raise(condition: bool, message: str) -> bool:\n",
" if condition:\n",
" return True\n",
- " display(HTML(f\"<div style=\\\"border-left:4px solid #d29922; padding:6px 10px; background:#fff8c5;\\\"><strong>Warning:</strong> {html.escape(message)}</div>\"))\n",
+ " display(HTML(f\"<div style=\\\"border-left:4px solid #d29922; padding:6px 10px;\\\"><strong>Warning:</strong> {html.escape(message)}</div>\"))\n",
" if FAIL_ON_CHECK_FAILURE:\n",
" raise AssertionError(message)\n",
" return False\n",
@@ -575,7 +575,7 @@
" safe_text = html.escape(truncate_display_text(text, limit=limit))\n",
" display(HTML(f\"\"\"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">{safe_label}</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">{safe_label}</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{safe_text}</div>\n",
" </div>\n",
" \"\"\"))\n",
@@ -700,7 +700,7 @@
"\n",
"\n",
"def print_key_takeaway(text: str) -> None:\n",
- " display(HTML(f\"<div style=\\\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\\\"><strong>Key takeaway:</strong> {html.escape(text)}</div>\"))\n",
+ " display(HTML(f\"<div style=\\\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\\\"><strong>Key takeaway:</strong> {html.escape(text)}</div>\"))\n",
"\n",
"\n",
"def redact_payload(payload: dict[str, Any]) -> dict[str, Any]:\n",
@@ -1018,7 +1018,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">ok</div>\n",
" </div>\n",
" "
@@ -1131,7 +1131,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> A tiny response confirms that the endpoint, key, model, and request shape are working.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> A tiny response confirms that the endpoint, key, model, and request shape are working.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -1187,7 +1187,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">JSON</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">JSON</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{\n",
" &quot;normalized_fields&quot;: [\n",
" &quot;exception_class&quot;,\n",
@@ -1334,7 +1334,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">curl -sS https://bedrock-mantle.us-west-2.api.aws/openai/v1/responses -H &#x27;Content-Type: application/json&#x27; -H &#x27;Authorization: Bearer $AWS_BEARER_TOKEN_BEDROCK&#x27; -d &#x27;{&quot;model&quot;: &quot;openai.gpt-5.4&quot;, &quot;input&quot;: &quot;BrightCart customer Maya asks why replacement order ORDER-8831 is delayed. Write two labeled plain-text lines for the support agent. Do not use leading hyphens or bold text.&quot;, &quot;max_output_tokens&quot;: 1024, &quot;store&quot;: false}&#x27;</div>\n",
" </div>\n",
" "
@@ -1349,7 +1349,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> The curl command shows the raw HTTPS shape behind the SDK call.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> The curl command shows the raw HTTPS shape behind the SDK call.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -1468,7 +1468,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">Empathy: I’m sorry, Maya — your replacement order ORDER-8831 is delayed because the carrier reported a temporary transit hold at the regional sorting facility.\n",
"Action: We’re monitoring the shipment closely and will send you an updated delivery estimate within 24 hours; if there’s no movement by then, we’ll review the next replacement or refund options with you.</div>\n",
" </div>\n",
@@ -1486,7 +1486,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Response summary</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Response summary</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{\n",
" &quot;id&quot;: &quot;resp_naythl6fvzhoctlsdogd4vpr673q5ibagqqpiujbast3sy6viroa&quot;,\n",
" &quot;model&quot;: &quot;openai.gpt-5.4&quot;,\n",
@@ -1505,7 +1505,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> The response body contains message output that application code can extract as text.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> The response body contains message output that application code can extract as text.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -1641,7 +1641,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">Use the Responses API to build a BrightCart support assistant that can answer customer questions, summarize policies, and guide users through common workflows like order tracking, refunds, and account updates. Ground the assistant in BrightCart documentation and connect it to relevant backend tools or APIs so it can retrieve live order data, check account status, and provide accurate, context-aware support responses. Design the experience around clear system instructions, structured tool calling, and conversation state management so the assistant stays on-brand, reliable, and safe when handling customer issues.</div>\n",
" </div>\n",
" "
@@ -1754,7 +1754,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> The SDK returns a response object with text, status, token usage, and output item metadata.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> The SDK returns a response object with text, status, token usage, and output item metadata.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -1886,7 +1886,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">goal: Help support agents explain delayed replacement orders, set expectations, and suggest next steps.\n",
"data needed: Order ID, replacement order status, shipment/tracking events, delay reason, estimated ship/delivery date, customer contact history, inventory/backorder status, and applicable refund or reship policy.\n",
"human-review rule: Escalate to a human if the delay exceeds policy thresholds, tracking is inconsistent or missing, the order appears lost, the customer is high-risk or highly upset, or any refund/reship exception is requested.</div>\n",
@@ -1905,7 +1905,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Created response summary</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Created response summary</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{\n",
" &quot;id&quot;: &quot;resp_cvhvh7y5ghwrpa35snvk4bzgcgthgxp4tgwkllmf5mrhs7dikfia&quot;,\n",
" &quot;model&quot;: &quot;openai.gpt-5.4&quot;,\n",
@@ -2031,7 +2031,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> store=True lets an application retrieve the response later by ID with usage metadata intact.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> store=True lets an application retrieve the response later by ID with usage metadata intact.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -2189,7 +2189,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">Latency benefit: Prompt caching lets the BrightCart support assistant reuse previously processed context, reducing response time for repeated or similar requests.\n",
"Consistency benefit: Prompt caching helps the BrightCart support assistant return more uniform answers by reusing the same established prompt context across interactions.</div>\n",
" </div>\n",
@@ -2303,7 +2303,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> Model controls travel with the same request as normal input, while returned metadata can vary by endpoint.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> Model controls travel with the same request as normal input, while returned metadata can vary by endpoint.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -2456,7 +2456,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> The schema is part of the request and defines the fields the next cell validates.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> The schema is part of the request and defines the fields the next cell validates.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -2598,7 +2598,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{\n",
" &quot;ticket_id&quot;: &quot;TICKET-7429&quot;,\n",
" &quot;category&quot;: &quot;delivery_delay&quot;,\n",
@@ -2726,7 +2726,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> Schema-constrained output gives application code a predictable JSON object to parse and validate.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> Schema-constrained output gives application code a predictable JSON object to parse and validate.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -2868,7 +2868,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{\n",
" &quot;customer_name&quot;: &quot;Maya Chen&quot;,\n",
" &quot;order_id&quot;: &quot;ORDER-8831&quot;,\n",
@@ -2992,7 +2992,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> JSON mode is useful when valid JSON is enough and a strict schema is not required.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> JSON mode is useful when valid JSON is enough and a strict schema is not required.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -3051,7 +3051,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Request shape</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Request shape</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{\n",
" &quot;compact&quot;: {\n",
" &quot;model&quot;: &quot;openai.gpt-5.4&quot;,\n",
@@ -3087,7 +3087,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: compact guidance</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: compact guidance</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">BrightCart’s delayed-replacement policy lets customers keep using the original item until the replacement arrives, then return the defective product within the allowed return window.</div>\n",
" </div>\n",
" "
@@ -3104,7 +3104,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: detailed guidance</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: detailed guidance</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">1. BrightCart sends replacements after customers return the original item and warehouse receipt is confirmed.\n",
"2. This delay prevents duplicate shipments, verifies eligibility, and reduces fraud or inventory errors.\n",
"3. Agents should explain timelines clearly, offer return instructions, and reassure customers once receipt is logged.</div>\n",
@@ -3214,7 +3214,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> Verbosity controls tune the answer style while the prompt still bounds the output.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> Verbosity controls tune the answer style while the prompt still bounds the output.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -3311,7 +3311,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">JSON</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">JSON</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">[\n",
" &quot;get_order_status&quot;,\n",
" &quot;get_customer_profile&quot;\n",
@@ -3339,7 +3339,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">JSON</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">JSON</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{\n",
" &quot;order_id&quot;: &quot;ORDER-8831&quot;,\n",
" &quot;customer_id&quot;: &quot;CUST-1042&quot;,\n",
@@ -3548,7 +3548,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: tool arguments</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: tool arguments</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{\n",
" &quot;order_id&quot;: &quot;ORDER-8831&quot;\n",
"}</div>\n",
@@ -3567,7 +3567,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: tool output</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: tool output</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{\n",
" &quot;order_id&quot;: &quot;ORDER-8831&quot;,\n",
" &quot;customer_id&quot;: &quot;CUST-1042&quot;,\n",
@@ -3592,7 +3592,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: final model answer</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: final model answer</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">Status: ORDER-8831 is delayed; carrier shows no movement for 36 hours at the Denver sort center, with promised delivery on 2026-06-01.\n",
"Next best action: Monitor until the 48-hour threshold; if no movement then, contact the customer and offer either an expedited replacement or a 15% concession with agent approval.</div>\n",
" </div>\n",
@@ -3706,7 +3706,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> Function calling separates model-selected arguments from application-executed business logic.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> Function calling separates model-selected arguments from application-executed business logic.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -3899,7 +3899,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: returned tool calls</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: returned tool calls</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{\n",
" &quot;tool_call_count&quot;: 1,\n",
" &quot;order_ids&quot;: [\n",
@@ -3921,7 +3921,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: local tool outputs</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: local tool outputs</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">[\n",
" {\n",
" &quot;order_id&quot;: &quot;ORDER-8831&quot;,\n",
@@ -3957,7 +3957,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: final model answer</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: final model answer</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">Order statuses: ORDER-8831 is delayed and ORDER-2044 was delivered yesterday.\n",
"Shipping problems: Maya has one active shipping problem, because only ORDER-8831 is currently delayed while ORDER-2044 is already delivered.</div>\n",
" </div>\n",
@@ -4071,7 +4071,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> Local lookup outputs keep the parallel-tool pattern understandable if not every call is returned.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> Local lookup outputs keep the parallel-tool pattern understandable if not every call is returned.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -4245,7 +4245,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: local fallback normalization</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: local fallback normalization</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">ORDER_ID: ORDER-8831\n",
"CUSTOMER_ID: CUST-1042\n",
"ISSUE: REPLACEMENT DELAYED\n",
@@ -4266,7 +4266,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: returned output item types</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: returned output item types</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">[\n",
" &quot;custom_tool_call&quot;\n",
"]</div>\n",
@@ -4285,7 +4285,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: custom tool input</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: custom tool input</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">order-8831 | cust-1042 | replacement delayed | customer wants supervisor | offer expedited replacement or 15% concession</div>\n",
" </div>\n",
" "
@@ -4302,7 +4302,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: application-owned normalized output</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: application-owned normalized output</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">ORDER_ID: ORDER-8831\n",
"CUSTOMER_ID: CUST-1042\n",
"ISSUE: REPLACEMENT DELAYED\n",
@@ -4419,7 +4419,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> Custom tools are useful when the application owns a freeform parsing or execution step.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> Custom tools are useful when the application owns a freeform parsing or execution step.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -4530,7 +4530,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: PDF transcript preview</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: PDF transcript preview</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">BrightCart support transcript\n",
"Ticket: TICKET-7429\n",
"Customer: Maya Chen\n",
@@ -4632,7 +4632,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: expected fields</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: expected fields</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{\n",
" &quot;ticket_id&quot;: &quot;TICKET-7429&quot;,\n",
" &quot;customer&quot;: &quot;Maya Chen&quot;,\n",
@@ -4654,7 +4654,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{&quot;ticket_id&quot;:&quot;TICKET-7429&quot;,&quot;customer&quot;:&quot;Maya Chen&quot;,&quot;order_id&quot;:&quot;ORDER-8831&quot;,&quot;product&quot;:&quot;Standing desk replacement&quot;,&quot;issue&quot;:&quot;Replacement for a damaged item is delayed and carrier scan has not moved&quot;,&quot;requested_resolution&quot;:&quot;Supervisor callback and refund options&quot;,&quot;policy_options&quot;:&quot;expedited replacement or 15% concession with agent approval after 48-hour delay&quot;}</div>\n",
" </div>\n",
" "
@@ -4767,7 +4767,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> Direct file input is useful when the file should be read in the current request context.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> Direct file input is useful when the file should be read in the current request context.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -5010,7 +5010,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">Ticket ID: TICKET-4812\n",
"Order ID: ORDER-8831\n",
"Customer Name: Maya Chen\n",
@@ -5127,7 +5127,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> previous_response_id lets a follow-up use stored context without resending the full prior turn.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> previous_response_id lets a follow-up use stored context without resending the full prior turn.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -5268,7 +5268,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">Customer: Jordan Lee reported ORDER-7718 arrived with a cracked monitor stand.\n",
"Issue: Damaged item; monitor stand is cracked on arrival.\n",
"Requested Resolution: Customer wants a replacement shipped this week.\n",
@@ -5385,7 +5385,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> Stateless continuation sends the relevant history with each request when the application owns conversation storage.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> Stateless continuation sends the relevant history with each request when the application owns conversation storage.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -5528,7 +5528,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: reasoning metadata</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: reasoning metadata</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{\n",
" &quot;returned_item_types&quot;: [\n",
" &quot;reasoning&quot;,\n",
@@ -5551,7 +5551,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: follow-up answer</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: follow-up answer</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">Recommendation: Stateless continuation\n",
"Reason: In a regulated support workflow, requiring names, order IDs, and refund context to be explicitly provided each turn improves controllability, auditability, and data-minimization, reducing the risk of unintended retention or cross-session leakage.</div>\n",
" </div>\n",
@@ -5665,7 +5665,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> Encrypted reasoning content can be carried forward where supported without exposing hidden reasoning text.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> Encrypted reasoning content can be carried forward where supported without exposing hidden reasoning text.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -5825,7 +5825,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Prompt-cache input size</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Prompt-cache input size</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{\n",
" &quot;estimated_input_words&quot;: 3016,\n",
" &quot;target_minimum_tokens&quot;: 2048\n",
@@ -5845,7 +5845,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">Hi Maya, I’m sorry your replacement order ORDER-8831 is delayed. I’m checking the latest replacement and carrier status now so I can confirm the best next step for you without making you wait longer than necessary.</div>\n",
" </div>\n",
" "
@@ -5862,7 +5862,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">First request summary</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">First request summary</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{\n",
" &quot;id&quot;: &quot;resp_3w6r6ipbqa5z2max35awv3i23i5sjmfa33zzw3vhpgqxcvchhkgq&quot;,\n",
" &quot;model&quot;: &quot;openai.gpt-5.4&quot;,\n",
@@ -5892,7 +5892,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Second request summary</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Second request summary</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{\n",
" &quot;id&quot;: &quot;resp_zzjeqttoswdjdwwl56xpolvly23w4h2n5dtsdoddgxqwfbkn7npq&quot;,\n",
" &quot;model&quot;: &quot;openai.gpt-5.4&quot;,\n",
@@ -5995,7 +5995,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> cached_input_tokens is the metadata field to inspect for prompt-cache reuse.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> cached_input_tokens is the metadata field to inspect for prompt-cache reuse.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -6185,7 +6185,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: status history</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: status history</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">[\n",
" &quot;in_progress&quot;,\n",
" &quot;completed&quot;\n",
@@ -6205,7 +6205,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result: manager summary</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result: manager summary</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">theme: Shipping delays dominate, especially West Coast distribution lane.\n",
"risk: Rising dissatisfaction from delays, replacements, and return exceptions.\n",
"next action: Escalate West Coast lane issues and review holiday return policy.</div>\n",
@@ -6320,7 +6320,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> Background mode starts work asynchronously and lets the application poll by response ID.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> Background mode starts work asynchronously and lets the application poll by response ID.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
@@ -6394,7 +6394,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">JSON</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">JSON</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{\n",
" &quot;feature&quot;: &quot;Compaction&quot;,\n",
" &quot;how_to_apply&quot;: &quot;Summarize older support turns into durable facts, open questions, policy constraints, and next actions before continuing the workflow.&quot;,\n",
@@ -6538,7 +6538,7 @@
"text/html": [
"\n",
" <div style=\"border:1px solid #d0d7de; border-radius:6px; margin:8px 0; overflow:hidden; font-size:13px;\">\n",
- " <div style=\"background:#f6f8fa; padding:6px 8px; font-weight:600;\">Result</div>\n",
+ " <div style=\"padding:6px 8px; font-weight:600;\">Result</div>\n",
" <div style=\"padding:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45;\">{\n",
" &quot;region_hint&quot;: &quot;us-west-2&quot;,\n",
" &quot;base_url_host&quot;: &quot;bedrock-mantle.us-west-2.api.aws&quot;,\n",
@@ -6650,7 +6650,7 @@
{
"data": {
"text/html": [
- "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; background:#f6f8fa; margin:8px 0;\"><strong>Key takeaway:</strong> Responsiveness samples are setup checks, not a load test or service-level measurement.</div>"
+ "<div style=\"border-left:4px solid #1f6feb; padding:6px 10px; margin:8px 0;\"><strong>Key takeaway:</strong> Responsiveness samples are setup checks, not a load test or service-level measurement.</div>"
],
"text/plain": [
"<IPython.core.display.HTML object>"