OpenAI Assistants API Parallel Function Calling + Node.js ๐Ÿคฏ Custom GPT ๐Ÿš€ (Step-by-Step Tutorial)

Mervin Praison ยท Beginner ยท๐Ÿง  Large Language Models ยท2y ago

Key Takeaways

This video demonstrates how to integrate multiple software functions into GPT assistants using the OpenAI Assistants API and parallel function calling in Node.js, allowing users to fetch stock prices, perform currency conversions, and retrieve the latest news simultaneously.

Full Transcript

this is amazing what if you can integrate multiple functions multiple softwares in your GPT assistants using assistance API not only that what if you can trigger this parallel function calling in your nodejs application that's exactly what we're going to see today let's get [Music] started hi everyone I'm really excited to show you about parallel function calling using node.js in this we'll be seeing how a user can interact with multiple functions such as getting a stock price currency conversion and also getting the latest news I'm going to take you through step by step on how to do this but before that I regularly create videos in regards to Artificial Intelligence on my YouTube channel so do subscribe click the like button and stay tuned coming to parallel function calling in this application we are going to make a user to call all these three functions we have already covered how to call one function in my previous video which I will link that in in the description below in this we going to add two more function currency conversion and retrieving the latest news of a company as a continuation from my previous video we already created get stock price function and then we Define the function definition in the tools variable and then we pause this tools inside the assistance. create function here we also started creating assistant and running it by defining your assistant creating a thread and sending a message then creating a message creating and run with custom instructions now we going to add two more functions to implement parallel function calling so this is our package.json the list of packages we are installing first is node fetch to fetch from a URL next is open Ai and third one is Yahoo finance to get the stock price in the terminal make sure you install npm install node fetch next npm install open Ai and npm install Yahoo finance 2 next export your open a API key like this and Export your genus API key like this which you can generate from genus website to get the latest news of a company now we're going to add two more functions first import fetch from node fetch then Asing function get latest company news and then we are passing the GS API key and we are fetching the API URL to get the latest news of the company NeXT another function USD to gpp conversion we are going to use exchange rate API URL then we are fetching the conversion data we are now completed creating the second function now we going to add our function definition previously we have only get stock price now we're going to add get latest company news function definition with company name as a required field and then USD to GBP conversion and only required is USD amount then this tools definition will be passed to assistant do create as we have done before and lastly we need to add our functions in the dispatch table so first the company news next USD to gbb conversion so when the application check the status equals request action it'll automatically Loop through all these functions and run these functions parallely so when we run the assistant and when the status is equals requires action that's when we Loop through all the three functions and run those functions back now we going to run this code node parall function calling. JS and click enter now we can see it goes to the required action status and it's calling two functions one is get stock price another one is get latest company news at the same time it provides the required AAPL symbol and apple the company name then this will trigger our dispatch table looping through all those functions and it will return the output back to the assistance API again now there's another function being called USD to gpp by providing the USD amount this can be called only at this stage because in the previous stage we need to retrieve the stock price and in this stage we converting to gpp we can see that stat is in progress now it got completed assistant here is the latest information you requested for Apple stock price $11 191 stock price in gpp p150 and the latest news three reason you should try Apple's joural app these Apple AAG deals make great gifts for forgetful friends and it gave us 10 News the question we asked is can you please provide me stock price stock price in GBP and the company news of Apple the question we mentioned here when we created the message that's it as simple as that now you are able to run parallel function calling using your nodejs application I'm going to create more videos similar to this so stay tuned I hope you like this video video do like share and subscribe and thanks for watching

Original Description

๐Ÿ”ฅ Discover the Power of Parallel Function Calling in Node.js / Javascript with GPT Assistants! ๐Ÿค– Learn how to integrate multiple software functions into your GPT assistants. ๐Ÿ’น Master fetching stock prices, performing currency conversions, and retrieving the latest news โ€“ all at once! ๐Ÿ› ๏ธ Step-by-step guide on implementing additional functions in your existing Node.js application. ๐Ÿง  Get insider tips on package installation, API setup, and function definitions. โœจ See real-time examples of parallel function execution and get results like never before. ๐Ÿ•’ Timestamps: 0:00 - Introduction to Parallel Function Calling 0:30 - Interacting with Multiple Functions 1:00 - Adding Currency Conversion and News Retrieval Functions 1:40 - Setting up Packages and APIs 2:10 - Writing Function Definitions 3:00 - Dispatch Table and Parallel Execution 3:35 - Running the Code and Observing Output ๐Ÿ‘ Benefits of Watching: Enhance your Node.js skills with cutting-edge techniques. Boost your AI integration capabilities. Gain practical, hands-on experience with real examples. Stay ahead in the rapidly evolving field of AI and software development. What if you could integrate multiple functions and software into your GPT assistance using assistance API? In this video, we'll show you exactly how to do that, as well as how to trigger parallel function calling in your Node.js application. Get ready to take your programming skills to the next level! Don't forget to subscribe for more exciting tutorials like this one. GPT Assistants Function Calling + Node.js : https://www.youtube.com/watch?v=YTURKTxMaZE GPT-4 Assistants API +Node: https://www.youtube.com/watch?v=CPlwcY5mQ_4 ChatGPT Tutorials Playlist: https://www.youtube.com/playlist?list=PLYQsp-tXX9w62Lgpvx2JMBvKAAi7rfb_t GPT-4 Assistants API + Python: https://www.youtube.com/watch?v=pZUDEQs89zc ChatGPT Beginners Guide: https://www.youtube.com/watch?v=_E9rqrnPzWI GPT-4 Turbo: https://www.youtube.com/watch?v=Fo0KEPP7Nt4 GPT-4 Seed: htt
Watch on YouTube โ†— (saves to browser)
Sign in to unlock AI tutor explanation ยท โšก30

Playlist

Uploads from Mervin Praison ยท Mervin Praison ยท 0 of 60

โ† Previous Next โ†’
1 Build GCP Infra using Pulumi in YAML format
Build GCP Infra using Pulumi in YAML format
Mervin Praison
2 How to Convert a Pulumi YAML File to Python Format
How to Convert a Pulumi YAML File to Python Format
Mervin Praison
3 Speed Up AWS EKS: A Complete Guide to Performance Tuning & Debugging!
Speed Up AWS EKS: A Complete Guide to Performance Tuning & Debugging!
Mervin Praison
4 Learn GCP GKE to AWS EKS Migration in Just 5 Minutes: Quick Guide
Learn GCP GKE to AWS EKS Migration in Just 5 Minutes: Quick Guide
Mervin Praison
5 AWS & Kubernetes: The Definitive Guide to Data Persistence with PV and PVC
AWS & Kubernetes: The Definitive Guide to Data Persistence with PV and PVC
Mervin Praison
6 ChatGPT Voice Conversation RELEASED! It's AMAZING!! (Demo)
ChatGPT Voice Conversation RELEASED! It's AMAZING!! (Demo)
Mervin Praison
7 How to Install Mistral 7B in Minutes: Quick & Easy Guide! โœ…
How to Install Mistral 7B in Minutes: Quick & Easy Guide! โœ…
Mervin Praison
8 Code Llama Install Locally: ๐Ÿ๐Ÿ’ป Elevate Your Python Skills!
Code Llama Install Locally: ๐Ÿ๐Ÿ’ป Elevate Your Python Skills!
Mervin Praison
9 Orca Mini: Your Ultimate Guide to Install and Test on Mac & Linux ๐Ÿ’ป
Orca Mini: Your Ultimate Guide to Install and Test on Mac & Linux ๐Ÿ’ป
Mervin Praison
10 Quick & Easy Vicuna Setup on Mac and Linux ๐Ÿ’ป
Quick & Easy Vicuna Setup on Mac and Linux ๐Ÿ’ป
Mervin Praison
11 Quick Guide: Llama2 Local Installation and ChatGPT with pip! Python๐Ÿ› ๏ธ
Quick Guide: Llama2 Local Installation and ChatGPT with pip! Python๐Ÿ› ๏ธ
Mervin Praison
12 Query PDFs Like a Pro with Local GPT: Full Setup Guide! ๐Ÿ“œ
Query PDFs Like a Pro with Local GPT: Full Setup Guide! ๐Ÿ“œ
Mervin Praison
13 LM Studio: EASIEST way to Run Large Language Models Locally!
LM Studio: EASIEST way to Run Large Language Models Locally!
Mervin Praison
14 AMAZING ChatGPT Vision is OUT! ๐Ÿคฏ 14+ Examples (Step-by-Step) FULL Tutorial
AMAZING ChatGPT Vision is OUT! ๐Ÿคฏ 14+ Examples (Step-by-Step) FULL Tutorial
Mervin Praison
15 Unbelievable! Build ANY App Instantly with Smol AI! ๐Ÿ˜ฒ๐Ÿ”ฅ
Unbelievable! Build ANY App Instantly with Smol AI! ๐Ÿ˜ฒ๐Ÿ”ฅ
Mervin Praison
16 Amazing! AutoGen Made Easy: A Step-by-Step Beginners Guide ๐Ÿ“š
Amazing! AutoGen Made Easy: A Step-by-Step Beginners Guide ๐Ÿ“š
Mervin Praison
17 How to Set Up LoLLMS and Run LLMs Locally! ๐Ÿš€ Step-by-Step Tutorial
How to Set Up LoLLMS and Run LLMs Locally! ๐Ÿš€ Step-by-Step Tutorial
Mervin Praison
18 GPT4All: INSANE Way to Run Large Language Models Locally! ๐Ÿ˜ฒ Step-By-Step Tutorial
GPT4All: INSANE Way to Run Large Language Models Locally! ๐Ÿ˜ฒ Step-By-Step Tutorial
Mervin Praison
19 Incredible AI-Powered NPCs in Unity Game Engine: Step by Step Tutorial!๐Ÿคฏ
Incredible AI-Powered NPCs in Unity Game Engine: Step by Step Tutorial!๐Ÿคฏ
Mervin Praison
20 MemGPT ๐Ÿง  LLM as Operating System. It's INSANE! Step-by-Step Tutorial ๐Ÿคฏ
MemGPT ๐Ÿง  LLM as Operating System. It's INSANE! Step-by-Step Tutorial ๐Ÿคฏ
Mervin Praison
21 Text Generation Web UI: MIND-BLOWING Way to Run LLM Locally! ๐Ÿคฏ
Text Generation Web UI: MIND-BLOWING Way to Run LLM Locally! ๐Ÿคฏ
Mervin Praison
22 Unlock the INSANE Power of OpenAI GPT-4 with C#/.NET! ๐Ÿ˜ฒ
Unlock the INSANE Power of OpenAI GPT-4 with C#/.NET! ๐Ÿ˜ฒ
Mervin Praison
23 Integrate Langchain and Ollama for Local AI Power ๐Ÿคฏ Indeed POWERFUL!
Integrate Langchain and Ollama for Local AI Power ๐Ÿคฏ Indeed POWERFUL!
Mervin Praison
24 ChatDev: INSANE Virtual AI Agents! Future of Software Development ๐Ÿ˜ฒ
ChatDev: INSANE Virtual AI Agents! Future of Software Development ๐Ÿ˜ฒ
Mervin Praison
25 Query PDFs Using Mistral: Unlock INSANE Power! ๐Ÿคฏ
Query PDFs Using Mistral: Unlock INSANE Power! ๐Ÿคฏ
Mervin Praison
26 AutoGen + Open-Source LLMs: UNBELIEVABLE! Step-by-Step Tutorial You Can't Miss! ๐Ÿคฏ
AutoGen + Open-Source LLMs: UNBELIEVABLE! Step-by-Step Tutorial You Can't Miss! ๐Ÿคฏ
Mervin Praison
27 AutoGen + Text Generation WebUI: Unbelievable 100% Local Private Setup ๐Ÿคฏ
AutoGen + Text Generation WebUI: Unbelievable 100% Local Private Setup ๐Ÿคฏ
Mervin Praison
28 MemGPT: Amazing! External Context for LLM #ai #llm #memgpt  #generativeai #mem #gpt #openai #chatgpt
MemGPT: Amazing! External Context for LLM #ai #llm #memgpt #generativeai #mem #gpt #openai #chatgpt
Mervin Praison
29 GeniA: Kubernetes + AI for MIND-BLOWING Operational Efficiency! ๐Ÿคฏ FULL Tutorial
GeniA: Kubernetes + AI for MIND-BLOWING Operational Efficiency! ๐Ÿคฏ FULL Tutorial
Mervin Praison
30 VertexAI Meets LangChain for Mind-Blowing AI Conversations! ๐Ÿ˜ฒ Step by Step Tutorial
VertexAI Meets LangChain for Mind-Blowing AI Conversations! ๐Ÿ˜ฒ Step by Step Tutorial
Mervin Praison
31 Simplified ChatGPT API Setup on Node.js for Newbies! ๐Ÿ˜ Step by Step Tutorial
Simplified ChatGPT API Setup on Node.js for Newbies! ๐Ÿ˜ Step by Step Tutorial
Mervin Praison
32 Autogen: Ollama integration ๐Ÿคฏ Step by Step Tutorial. Mind-blowing!
Autogen: Ollama integration ๐Ÿคฏ Step by Step Tutorial. Mind-blowing!
Mervin Praison
33 LiteLLM: One-Function Call to ANY Large Language Model! ๐Ÿคฏ UNBELIEVABLE!
LiteLLM: One-Function Call to ANY Large Language Model! ๐Ÿคฏ UNBELIEVABLE!
Mervin Praison
34 ChatGPT Chatbot in Less Time Than You Think! ๐Ÿš€๐Ÿ˜Ž Step-by-Step Tutorial
ChatGPT Chatbot in Less Time Than You Think! ๐Ÿš€๐Ÿ˜Ž Step-by-Step Tutorial
Mervin Praison
35 LiteLLM Chatbot: Build Your Own in MINUTES! INSANE! ๐Ÿค–๐Ÿ”ฅ
LiteLLM Chatbot: Build Your Own in MINUTES! INSANE! ๐Ÿค–๐Ÿ”ฅ
Mervin Praison
36 Create Chatbot: Turn ANY Open-Source LLM into a Conversation Pro! ๐Ÿค–
Create Chatbot: Turn ANY Open-Source LLM into a Conversation Pro! ๐Ÿค–
Mervin Praison
37 Create Chatbot: Ollama Integration Made UNBELIEVABLY Easy! ๐ŸŽ‰
Create Chatbot: Ollama Integration Made UNBELIEVABLY Easy! ๐ŸŽ‰
Mervin Praison
38 LlamaIndex + ChatGPT: Ingest Data and Experience UNBELIEVABLE Query Results! ๐ŸŒŸ
LlamaIndex + ChatGPT: Ingest Data and Experience UNBELIEVABLE Query Results! ๐ŸŒŸ
Mervin Praison
39 INSANE! OpenAgents: Automated Data Analysis with Kaggle ๐Ÿคฏ
INSANE! OpenAgents: Automated Data Analysis with Kaggle ๐Ÿคฏ
Mervin Praison
40 React.js LLM Agent for Next-Gen Coding using ChatGPT ๐Ÿš€ Mind-Blowing ๐Ÿคฏ
React.js LLM Agent for Next-Gen Coding using ChatGPT ๐Ÿš€ Mind-Blowing ๐Ÿคฏ
Mervin Praison
41 MemGPT + Any LLM ๐Ÿš€ 100% Local & Private Integration Unveiled! Unlimited Memory
MemGPT + Any LLM ๐Ÿš€ 100% Local & Private Integration Unveiled! Unlimited Memory
Mervin Praison
42 MemGPT  + AutoGen ๐Ÿง ๐Ÿค– Unlimited Memory & Autonomous AI Agents! INSANE๐Ÿคฏ
MemGPT + AutoGen ๐Ÿง ๐Ÿค– Unlimited Memory & Autonomous AI Agents! INSANE๐Ÿคฏ
Mervin Praison
43 AutoGen + Google's Palm LLM & More! Revolutionary AI Integration ๐Ÿš€
AutoGen + Google's Palm LLM & More! Revolutionary AI Integration ๐Ÿš€
Mervin Praison
44 MemGPT & LM Studio Integration Revealed! ๐Ÿ”ฅ Next-Level AI
MemGPT & LM Studio Integration Revealed! ๐Ÿ”ฅ Next-Level AI
Mervin Praison
45 ๐Ÿš€ AutoLLM: Unlock the Power of 100+ Language Models! Step-by-Step Tutorial
๐Ÿš€ AutoLLM: Unlock the Power of 100+ Language Models! Step-by-Step Tutorial
Mervin Praison
46 AutoLLM & Gradio Integration You Won't Believe! ๐Ÿคฏ Mind-Blowing
AutoLLM & Gradio Integration You Won't Believe! ๐Ÿคฏ Mind-Blowing
Mervin Praison
47 AutoLLM & FastAPI Tutorial: Query 100+ Language Models! ๐Ÿ˜ฑ
AutoLLM & FastAPI Tutorial: Query 100+ Language Models! ๐Ÿ˜ฑ
Mervin Praison
48 Quivr: LLM's Second Brain - Transforming Data Management & Advanced Query with AI! ๐Ÿคฏ
Quivr: LLM's Second Brain - Transforming Data Management & Advanced Query with AI! ๐Ÿคฏ
Mervin Praison
49 AutoGen & MemGPT with Local LLM: A Complete Setup Tutorial! ๐Ÿง  AMAZING ๐Ÿคฏ
AutoGen & MemGPT with Local LLM: A Complete Setup Tutorial! ๐Ÿง  AMAZING ๐Ÿคฏ
Mervin Praison
50 LocalAI: Free, Open Source OpenAI Alternative ๐Ÿš€ INSANE ๐Ÿคฏ Step-by-Step Tutorial
LocalAI: Free, Open Source OpenAI Alternative ๐Ÿš€ INSANE ๐Ÿคฏ Step-by-Step Tutorial
Mervin Praison
51 Yarn Mistral 7B 128k LARGE context window, Small size ๐Ÿคฏ INSANE ๐Ÿš€ Setup Tutorial!
Yarn Mistral 7B 128k LARGE context window, Small size ๐Ÿคฏ INSANE ๐Ÿš€ Setup Tutorial!
Mervin Praison
52 Zephyr-7B: The Small and Mighty LLM ๐Ÿคฏ Step by Step Tutorial! ๐Ÿ“˜
Zephyr-7B: The Small and Mighty LLM ๐Ÿคฏ Step by Step Tutorial! ๐Ÿ“˜
Mervin Praison
53 Promptfoo: How to Test Your LLM ? ๐Ÿš€  VERY EASY!
Promptfoo: How to Test Your LLM ? ๐Ÿš€ VERY EASY!
Mervin Praison
54 Pydantic: How to Validate LLM Responses? ๐Ÿš€ Quality Response. VERY EASY!!!!
Pydantic: How to Validate LLM Responses? ๐Ÿš€ Quality Response. VERY EASY!!!!
Mervin Praison
55 Pydantic: FORCE Your AI to Respond Back in UPPERCASE! ๐Ÿคฏ Step-by-Step Tutorial ๐Ÿ”ฅ
Pydantic: FORCE Your AI to Respond Back in UPPERCASE! ๐Ÿคฏ Step-by-Step Tutorial ๐Ÿ”ฅ
Mervin Praison
56 Pydantic: How to use LLM to convert unstructured data to structured data?
Pydantic: How to use LLM to convert unstructured data to structured data?
Mervin Praison
57 AutoGen Function Calling: INSANE ๐Ÿš€ Custom Integrations! Step-by-Step Tutorial ๐Ÿคฏ
AutoGen Function Calling: INSANE ๐Ÿš€ Custom Integrations! Step-by-Step Tutorial ๐Ÿคฏ
Mervin Praison
58 OpenAI Assistants API + Python ๐Ÿค– How to get started? (FULL Tutorial) ๐Ÿคฏ INSANE
OpenAI Assistants API + Python ๐Ÿค– How to get started? (FULL Tutorial) ๐Ÿคฏ INSANE
Mervin Praison
59 GPT-4 Vision API ๐Ÿคฏ INSANE Video Recognition Powers! Step-by-Step Tutorial ๐Ÿš€
GPT-4 Vision API ๐Ÿคฏ INSANE Video Recognition Powers! Step-by-Step Tutorial ๐Ÿš€
Mervin Praison
60 GPT-4 Vision API ๐Ÿš€ The Future of Image Recognition! ๐Ÿคฏ Step-by-Step Tutorial
GPT-4 Vision API ๐Ÿš€ The Future of Image Recognition! ๐Ÿคฏ Step-by-Step Tutorial
Mervin Praison

This video teaches how to use the OpenAI Assistants API and Node.js to integrate multiple functions into GPT assistants, allowing for parallel function calling and simultaneous data retrieval.

Key Takeaways
  1. Install required packages (node-fetch, openai, Yahoo Finance)
  2. Export OpenAI API key and Genius API key
  3. Import fetch from node-fetch and define functions for getting latest company news and USD to GBP conversion
  4. Add function definitions to the tools variable and pass it to the assistant.create function
  5. Add functions to the dispatch table and loop through them when the status equals 'requires action'
๐Ÿ’ก Parallel function calling in Node.js allows for simultaneous execution of multiple functions, enabling GPT assistants to retrieve and process data from multiple sources efficiently.
๐Ÿ”’ Pro feature: Ask AI to explain this lesson โ†’

Related Reads

๐Ÿ“ฐ
A Silent Crash in Megatron-LMโ€™s Gradient Clipping (and a Reviewer Who Made My Fix Better)
Learn how a reliability bug in Megatron-LM's gradient clipping was fixed and why the simplest solution isn't always the first one you write
Medium ยท Machine Learning
๐Ÿ“ฐ
Nemotron Labs: How Open Models Give Enterprises and Nations AI They Can Trust, Control and Customize
Learn how open models can give enterprises and nations AI they can trust, control, and customize to improve workflows and exceed accuracy standards
NVIDIA AI Blog
๐Ÿ“ฐ
Building a Custom GPT / Chatbot for Your Own Use Case
Learn to build a custom GPT/chatbot for your specific use case using Python
Medium ยท Python
๐Ÿ“ฐ
Building a Custom GPT / Chatbot for Your Own Use Case
Learn to build a custom GPT/chatbot for your specific use case and understand the process of creating a tailored conversational AI model
Medium ยท RAG

Chapters (7)

Introduction to Parallel Function Calling
0:30 Interacting with Multiple Functions
1:00 Adding Currency Conversion and News Retrieval Functions
1:40 Setting up Packages and APIs
2:10 Writing Function Definitions
3:00 Dispatch Table and Parallel Execution
3:35 Running the Code and Observing Output
Up next
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
Watch โ†’