OpenAI Function Chaining: How AI Calls Multiple Functions in Sequence
Автор: NextGenQA
Загружено: 2026-02-13
Просмотров: 18
Описание:
In this video, we take function calling to the next level — chaining multiple functions together in sequence.
In our last video, we built single function calling with a validation gate. Today, OpenAI calls three functions automatically: create a product, update its price, then verify the change. Each step uses results from the previous one.
🎯 What You'll Learn:
How function chaining works step by step
The while loop that powers multi-step workflows
Why tool_call_id is critical for chaining
How the messages array grows with each iteration
How OpenAI automatically passes IDs between functions
💻 Code Breakdown:
✓ Three real Python functions (create, update, get)
✓ Tool definitions as model contracts
✓ System prompt that teaches chaining
✓ The chaining loop with stop condition
✓ Complete conversation history at the end
This is the exact pattern you need for real QA automation workflows — create test data, modify it, verify the change.
📂 GitHub: https://github.com/nextgenqaofficial/...
🔗 Resources:
OpenAI Function Calling Docs: https://platform.openai.com/docs/guid...
REST API used in video: https://restful-api.dev
Chapters:
0:00 Introduction
0:52 Overview of Function Chaining
1:09 Environment Setup
2:15 Understanding Method Chaining
3:29 Flow Diagram Explanation
4:51 API Base URL and Functions
5:38 Defining Python Functions
7:06 Tool Definitions
8:39 User Request Setup
10:23 Chaining Loop Setup
12:01 Tool Call Details
15:00 Executing Functions
20:05 Adding Assistant Messages
24:39 Sending Results to OpenAI
30:09 Iteration and Verification
33:18 Complete Conversation History
34:14 Conclusion
💡 About NextGenQA:
I'm Soumyansh, AVP and Senior QA Engineer with 13 years of experience. This channel is about AI-powered testing automation with practical, production-ready code.
#OpenAI #FunctionCalling #PythonAutomation #QAAutomation #AITesting #TestAutomation #APITesting #SoftwareTesting #NextGenQA #AIIntegration #ProductionCode #RESTApi #PythonTutorial #QAEngineering #Chaining
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: