Member-only story
Understanding Function Calling with Assistants API
An implementation with Azure OpenAI in Python
The Assistants API allows developers to create AI assistants within their own applications. An Assistant can be defined as an intelligent entity that can respond to user queries based on specific instructions. It is made of the following components:
- An LLM that powers the assistant, understanding the user’s intent and achieving the goal.
- Instructions that tailor the model towards a specific functionality. For example, you might configure the model with the following instructions: “You are a math assistant that helps students with their homework. You never provide full answers but rather help students reasoning on given problems”.
- Tools that can be leveraged to accomplish the task. For example, a tool can be a function which is able to navigate Bing to retrieve up-to-date information to answer user’s query.
Let’s now inspect the backend functioning of each component of the above workflow. To do so, we will leverage the Azure OpenAI Assistants API using Python. You will an instance of Azure OpenAI with a model…