Notebooks
A
Arize AI
Openai Function Calling Tracing

Openai Function Calling Tracing

arize-tutorialsopenaitracingLLMPython

arize logo
Docs | GitHub | Community

OpenAI Function Calling

Overview

This example is based on the Open AI function calling docs. We use the same example from the docs, instrumenting the Open AI chat completion calls so that the function calling traces can be viewed in the Arize platform and used in the Arize Prompt Playground.

Installations & Imports

[ ]
[ ]

Set Up API Keys and Register OTEL

Screenshot 2024-08-26 at 2.37.41 PM.png

[ ]

Register OTEL

[ ]

Open AI Auto Instrumentation

[ ]

Define Callable Function

[ ]

Define Tools

[ ]

LLM Chats with User to Get Order ID

[ ]
[ ]
[ ]

LLM Calls Tools Using Customer Order ID

[ ]
[ ]
[ ]

LLM Provides Function Call Response

[ ]
[ ]
[ ]

LLM Uses Function Call Response to Reply to User Message

[ ]
[ ]
[ ]
[ ]

View Traces

View traces to debug chat history and ensure the expected function call was made with the appropriate parameters.