🚧 Documentation is a work in progress, thank you for your patience! 🚧

How Func Runner Works

Concept

Func Runner is a software solution designed to simplify the integration of assistant function-calling into your technology stack. It leverages Azure Durable Function Apps to manage the execution of these functions, offering a scalable and reliable infrastructure that supports complex workflows. The goal of Func Runner is to streamline the process of building, deploying, and managing functions that are triggered by OpenAI assistants, ensuring that your application can scale efficiently while maintaining robust functionality.

Important Note - Func Runner Supports Multiple Applications

There is nothing stopping you from using a single Func Runner environment across all of your projects! That is the beauty of this project. If properly configured, Func Runner can help you rapidly develop OpenAI enabled applications at a pace that was previously unattainable.

Architecture

Func Runner’s architecture is built around Azure Durable Functions, which provide the foundation for orchestrating and executing various tasks in a stateful and reliable manner. The core components of Func Runner work together to facilitate the seamless execution of functions, handling everything from the receipt of requests to the final execution and result delivery.

Key Components

  1. Function App (function_app.py)
  • The main entry point of the application, where the Azure Function App is defined. This component orchestrates the execution of functions, managing the lifecycle of each task from start to finish.
  1. Func Runner Blueprint (func_runner_blueprint.py)
  • This file contains the blueprint for setting up and managing function executions. It defines the routing and execution logic, ensuring that incoming requests are correctly mapped to the appropriate functions.
  1. OpenAI Proxy (openai_proxy_blueprint.py)
  • This component acts as an intermediary between OpenAI and the Azure Function App. It translates OpenAI function-calling requests into executable tasks within the Azure environment, ensuring that each request is handled according to its specific requirements.
  1. Shared Utilities (shared.py)
  • This file includes common utilities and configurations used across the application. It helps standardize operations, manage configurations, and provide helper functions that are utilized by other components.

Interaction Between Components

  • Request Handling: When a function call is triggered by an OpenAI assistant, the request is received by the openai_proxy_blueprint.py component. This proxy translates the request into a format that the Azure Function App can process.

  • Orchestration and Execution: The function_app.py component orchestrates the function execution. It uses Azure Durable Functions to manage the stateful execution of tasks, ensuring that each function is executed in the correct order and that its state is preserved across different stages.

  • Function Logic: The core logic of each function is defined within the activity functions managed by the func_runner_blueprint.py. These activity functions perform the actual work, such as data processing or integration tasks, based on the inputs received from the OpenAI assistant.

  • Result Delivery: Once the function has been executed, the result is sent back through the Azure Durable Function’s orchestration flow and eventually returned to the OpenAI assistant via the proxy.

Summary

Func Runner is a powerful tool for integrating serverless function execution into your assistant applications. By leveraging Azure Durable Function Apps, it provides a scalable and reliable way to manage complex workflows, ensuring that your assistant’s function-calling capabilities can handle the demands of modern applications. The components of Func Runner work in harmony to process requests, execute tasks, and deliver results, all while maintaining the scalability and reliability that Azure offers.