Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions examples/tracing/openai/openai_tracing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@
"That's it! Now you can continue using the traced OpenAI client normally. The data is automatically published to Openlayer and you can start creating tests around it!"
]
},
{
"cell_type": "markdown",
"id": "fb5ebdad",
"metadata": {},
"source": [
"### 3.1 Chat Completions API"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -98,18 +106,32 @@
")"
]
},
{
"cell_type": "markdown",
"id": "4e6fb396",
"metadata": {},
"source": [
"### 3.2 Responses API"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "abaf6987-c257-4f0d-96e7-3739b24c7206",
"id": "21369c42",
"metadata": {},
"outputs": [],
"source": []
"source": [
"response = openai_client.responses.create(\n",
" model=\"gpt-4o-mini\",\n",
" input=\"What is 3 + 3?\",\n",
" max_output_tokens=50\n",
")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "bedrock-test",
"language": "python",
"name": "python3"
},
Expand All @@ -123,7 +145,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
"version": "3.12.3"
}
},
"nbformat": 4,
Expand Down
Loading