No video

OpenAI GPT Chat Completions API - Function Calling Explained - How does it work?

  Рет қаралды 6,870

Hubel Labs

Hubel Labs

Жыл бұрын

OpenAI Function Calling Explained with diagram and Hotel search as an example with some code/json snippets. Link to diagram here as per request in comments: link.excalidra...
--------------------
Function calling
Developers can now describe functions to gpt-4-0613 and gpt-3.5-turbo-0613, and have the model intelligently choose to output a JSON object containing arguments to call those functions. This is a new way to more reliably connect GPT's capabilities with external tools and APIs.
These models have been fine-tuned to both detect when a function needs to be called (depending on the user’s input) and to respond with JSON that adheres to the function signature. Function calling allows developers to more reliably get structured data back from the model. For example, developers can:
Create chatbots that answer questions by calling external tools (e.g., like ChatGPT Plugins)
Convert queries such as “Email Anya to see if she wants to get coffee next Friday” to a function call like send_email(to: string, body: string), or “What’s the weather like in Boston?” to get_current_weather(location: string, unit: 'celsius' | 'fahrenheit').

Пікірлер: 29
@laptopuser5198
@laptopuser5198 Жыл бұрын
Finally a good breakdown, everybody else is like "here's the weather in Boston."
@asrulmunir
@asrulmunir Жыл бұрын
Can't agree more 👍
@yesterwhere
@yesterwhere Жыл бұрын
This was the most clear explanation I have seen on function calling. Thank you!
@hubel-labs
@hubel-labs Жыл бұрын
That’s super nice of you to say - thanks!! If there are any other GPT topics that you can’t find good explanations for, do let me know!
@kevon217
@kevon217 10 ай бұрын
Literally came to say same thing. Well-explained!
@DaveBayless
@DaveBayless 8 ай бұрын
Thank you very much for sharing this explanation.
@user-wr4yl7tx3w
@user-wr4yl7tx3w 9 ай бұрын
this is quality explanation
@ruslan124
@ruslan124 Жыл бұрын
Best description so far if you are not a softwarecdeveloper. Thanks.
@MannyBernabe
@MannyBernabe Жыл бұрын
Great visual! Better explained in 5 minutes than some 20 min. videos I've seen. Thank you.
@registercheck
@registercheck 9 ай бұрын
very good explanation! thank you
@yourbestsail
@yourbestsail 8 ай бұрын
Absolutely excellent! Finally a crystal clear explanation! Thank you 😊
@jk27182
@jk27182 11 ай бұрын
Excellent job explaining this!
@sashirestela8572
@sashirestela8572 Жыл бұрын
A very clear explanation in 5 minutes! You're a rockstar!
@hubel-labs
@hubel-labs Жыл бұрын
Wow, thanks!
@valenciawalker6498
@valenciawalker6498 10 ай бұрын
Terrific. thank you!
@alexpietropaolo7526
@alexpietropaolo7526 Жыл бұрын
Awesome breakdown! Keep up the great work!
@ac_cobra8540
@ac_cobra8540 Жыл бұрын
Excellent explanation. Best I've seen so far on this topic. Thanks.
@AlgorithmicEchoes
@AlgorithmicEchoes Жыл бұрын
The best explanation on the internet. Thank you so much!
@hubel-labs
@hubel-labs Жыл бұрын
Glad it was helpful!
@123ankit321
@123ankit321 Жыл бұрын
This is amazing.
@ccnomz
@ccnomz Жыл бұрын
Thank you for this! I'm working on a presentation for my company in using ChatGPT to automate some critical internal processes and this way extremely helpful
@hubel-labs
@hubel-labs Жыл бұрын
Glad hear it helped - Good luck with your presentation!
@fanchuankang1228
@fanchuankang1228 Жыл бұрын
Very clear. Thank you!
@user-tc2ef9ek5r
@user-tc2ef9ek5r 5 ай бұрын
Great video!
@ShahidMogul
@ShahidMogul Жыл бұрын
Excellent explanation. Please keep up the good work.
@hubel-labs
@hubel-labs Жыл бұрын
Thanks, will do!
@francycharuto
@francycharuto Жыл бұрын
🎯 Key Takeaways for quick navigation: 00:00 📣 OpenAI has introduced function calling for people who want to create their own chat interfaces using the OpenAI API. 00:29 🗣️ A user can enter a prompt in the chat interface, for example, a query about a hotel in a specific location. 00:42 🧬 An API call is made to OpenAI, combining the user's prompt and descriptions of certain functions to enable OpenAI to extract more information. 01:20 🚀 OpenAI analyzes the user's text to determine which function should be used, matching the semantic meaning of the user's prompt with the descriptions of the functions. 02:29 🏨 An example of a function used in place, "get top 10 hotels", is triggered when a user asks for the best hotels matching their specified criteria. 03:35 👀 Based on the user prompt, OpenAI extracts relevant parameters, such as the city and neighborhood mentioned by the user, to pass back to the code. 04:18 ↩️ The code uses the name of the function to determine which APIs to call and the parameters give specific inputs to the API. 05:11 🔄 The output usually needs refining to make it less machine-like, so it is often sent back to OpenAI along with the original user prompt. OpenAI then crafts a more natural, well-worded response for the user. Made with HARPA AI
@ofir952
@ofir952 Жыл бұрын
Thanks, can you please share with us the drawing you showed?
@hubel-labs
@hubel-labs Жыл бұрын
Sure - here is a link and I will add it to the description as well in case other people find it helpful: link.excalidraw.com/readonly/HHrsKcGCRykTrSCcsfHH
GPT function calling in a nutshell
15:36
Henrik Kniberg
Рет қаралды 41 М.
Challenge matching picture with Alfredo Larin family! 😁
00:21
BigSchool
Рет қаралды 28 МЛН
OMG what happened??😳 filaretiki family✨ #social
01:00
Filaretiki
Рет қаралды 11 МЛН
女孩妒忌小丑女? #小丑#shorts
00:34
好人小丑
Рет қаралды 17 МЛН
ISSEI & yellow girl 💛
00:33
ISSEI / いっせい
Рет қаралды 16 МЛН
Get structured Json Output from OpenAI GPT API Consistently!
14:56
GPT-4o Changed Data Analysis Forever... (Full Guide)
23:41
AI Foundations
Рет қаралды 115 М.
OpenAI Embeddings and Vector Databases Crash Course
18:41
Adrian Twarog
Рет қаралды 444 М.
Master OpenAI Chat Completions API (Super simple!)
24:43
Code with Ania Kubów
Рет қаралды 7 М.
How does OpenAI Function Calling work?
5:21
Learn Data with Mark
Рет қаралды 10 М.
ChatGPT Functions - Full Tutorial for using OpenAI Functions
29:14
Adrian Twarog
Рет қаралды 89 М.
OpenAI Function Calling - Full Beginner Tutorial
28:24
Dave Ebbelaar
Рет қаралды 72 М.
Challenge matching picture with Alfredo Larin family! 😁
00:21
BigSchool
Рет қаралды 28 МЛН