You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"[](https://colab.research.google.com/github/openlayer-ai/openlayer-python/blob/main/examples/tracing/azure-content-understanding/azure_content_understanding_tracing.ipynb)\n",
"## 2. Import the `trace_azure_content_understanding` function and create the client"
58
+
]
59
+
},
60
+
{
61
+
"cell_type": "code",
62
+
"execution_count": null,
63
+
"id": "e60584fa",
64
+
"metadata": {},
65
+
"outputs": [],
66
+
"source": "from azure.ai.contentunderstanding import ContentUnderstandingClient\nfrom azure.ai.contentunderstanding.models import AnalysisInput\nfrom azure.core.credentials import AzureKeyCredential\n\nfrom openlayer.lib import configure, trace_azure_content_understanding\n\n# Configure if you want to upload documents to Openlayer storage\nconfigure(\n attachment_upload_enabled=True, # upload binary/file attachments\n url_upload_enabled=True, # also download & re-upload external URLs\n)\n\nclient = trace_azure_content_understanding(\n ContentUnderstandingClient(\n endpoint=os.environ.get(\"AZURE_CONTENT_UNDERSTANDING_ENDPOINT\"),\n credential=AzureKeyCredential(os.environ.get(\"AZURE_CONTENT_UNDERSTANDING_KEY\")),\n api_version=\"2025-11-01\",\n )\n)"
67
+
},
68
+
{
69
+
"cell_type": "markdown",
70
+
"id": "72a6b954",
71
+
"metadata": {},
72
+
"source": [
73
+
"## 3. Use your traced client normally"
74
+
]
75
+
},
76
+
{
77
+
"cell_type": "markdown",
78
+
"id": "76a350b4",
79
+
"metadata": {},
80
+
"source": [
81
+
"That's it! Now you can continue using your Azure Content Understanding client normally. The data is automatically published to Openlayer and you can start creating tests around it!"
0 commit comments