This example pipeline creates an AI-powered weather assistant that
uses Azure OpenAI's tool calling capabilities to answer weather-related questions. When a
user asks about weather in a specific location, the system determines whether to use
external weather API tools, makes the appropriate API calls, and returns formatted responses
through the AI assistant.
-
Configure the JSON Generator Snap to generate a JSON request containing a user message
"What's the weather in Hyderabad?" with instructions for the AI assistant to use available
tools.
-
Configure the Azure OpenAI Function Generator Snap to
create a function definition called
get_weather
that can retrieve current
weather information for a given location, with a city parameter.
Azure OpenAI Function Generator Snap configuration |
Azure OpenAI Function Generator Snap output |
|
|
-
Configure the Azure OpenAI Tool Calling Snap to call
the Azure OpenAI GPT-4o-mini model with tool calling capabilities, using the original
messages and generated tools to determine the appropriate response.
On validation, the Snap displays the processed response from Azure OpenAI.
Azure OpenAI Tool Calling Snap configuration |
Azure OpenAI Tool Calling Snap output |
|
|
-
Configure the HTTP Client Snap to handle additional HTTP requests if needed for external services during processing.
-
Configure the Mapper Snap to map and format the OpenAI response to the desired structure.
-
Configure the Azure OpenAI Function Result Generator
Snap to create a function definition called
get_weather
that can retrieve
current weather information for a given location, with a city parameter.
On validation, it generates a properly formatted function result using the function ID
and weather content for the AI model to process.
To successfully reuse this pipeline:
- Download and import the pipeline into SnapLogic.
- Configure Snap accounts as applicable.
- Provide pipeline parameters as needed.