Microsoft Azure

Any language. Any platform. Our team is focused on making the world more amazing for developers and IT operations communities with the best that Microsoft Azure can provide. If you want to contribute in this journey with us, contact us at medium@microsoft.com

Member-only story

Understanding Function Calling with Assistants API

An implementation with Azure OpenAI in Python

Valentina Alto
Microsoft Azure
Published in
8 min readMar 31, 2024

--

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.
Source: https://platform.openai.com/docs/assistants/how-it-works/objects

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…

--

--

Microsoft Azure
Microsoft Azure

Published in Microsoft Azure

Any language. Any platform. Our team is focused on making the world more amazing for developers and IT operations communities with the best that Microsoft Azure can provide. If you want to contribute in this journey with us, contact us at medium@microsoft.com

Valentina Alto
Valentina Alto

Written by Valentina Alto

Data&AI Specialist at @Microsoft | MSc in Data Science | AI, Machine Learning and Running enthusiast

Responses (1)