GPT function calling in a nutshell

  Рет қаралды 36,697

Henrik Kniberg

Henrik Kniberg

10 ай бұрын

GPT function calling is super useful! But it can be a bit tricky to understand at first. In this video I go through what it is and how you can use it in practice, using simple drawings and practical examples in Javascript.

Пікірлер: 86
@jakegearhart
@jakegearhart 9 ай бұрын
This was an excellent tutorial, I hadn't even thought about using functions to force a structured output but it makes perfect sense.
@henrikkniberg
@henrikkniberg 9 ай бұрын
Yeah it took me a while to realize that too!
@micheldev7941
@micheldev7941 6 ай бұрын
Excellent! This is the best concept overview with 2 real world use cases I came across with. To the point , clear and usable. Thank you
9 ай бұрын
This is a really smart way to give the AI arbitrary additional abilities without running into all kinds of security, rate limit, runtime etc. limits. You're basically allowing it to run specific things remotely on your computer.
@imnbsp
@imnbsp 3 күн бұрын
I had kinda understood function calling up to some point but this cleared up a few more things for me and I can see a lot farther away now 😂 Thanks 👍
@JoeGlines-Automator
@JoeGlines-Automator 6 ай бұрын
Excellent tutorial! Very well organized and clear! Your diagrams, explaining what is happening, really helped me understand the goals! Great job!
@jeffnelson4054
@jeffnelson4054 3 ай бұрын
Nice work, Henrik. I think your career pivot with GAI is inspiring. Thank you!
@JOHNSMITH-ve3rq
@JOHNSMITH-ve3rq 7 ай бұрын
You are good. Really clear presentation. Thanks.
@anazi
@anazi 4 ай бұрын
Subscribed 🎉🎉🎉 Best one who explained GPT functions
@Code.J
@Code.J 9 ай бұрын
Great stuff! Thanks for sharing. I learned a lot from the way you explained it :D
@RohitSharma-to7yy
@RohitSharma-to7yy 4 ай бұрын
Great tutorial. Easy to follow and very intuitive. Thanks a lot
@VitaminVS
@VitaminVS 4 ай бұрын
Big fan of of your presentation skills ❤
@salesgurupro
@salesgurupro 9 ай бұрын
This is amazing. Thanks for sharing. The whiteboard really helps visualize and understand things far more easily :)
@JuanDebrecen
@JuanDebrecen 9 ай бұрын
I'm not coder. Will never be probably. Yet I not only enjoyed this awesome tutorial, but actually understood it (at least most of the concept itself :P ) Thanks!
@GregDolan
@GregDolan 2 ай бұрын
Great tutorial, I'd really enjoy more of these 🙏
@lehuy7306
@lehuy7306 Ай бұрын
I'm 8 months late but this is still incredibly helpful. Thanks!
@alfredpeter2404
@alfredpeter2404 27 күн бұрын
I'm 8 months and 4 days late, and I totally agree with you!
@dklearning2247
@dklearning2247 23 күн бұрын
I’m 8 months and 8 and 8 days late, but indeed it very good
@alexsandergutierrezgoncalves
@alexsandergutierrezgoncalves 9 ай бұрын
This is very cool, there are many possibilities for creations
@ShanmukhD-sr6bp
@ShanmukhD-sr6bp 4 ай бұрын
Thanks a lot for the explanation. You explain things very well, please continue creating more such videos especially topics revolving around generative AI, Neural networks and more
@UgurMahirOzkaya
@UgurMahirOzkaya 7 ай бұрын
Sir this video is great! thanks for sharing knowledge. have a great day
@user-wr4yl7tx3w
@user-wr4yl7tx3w 7 ай бұрын
best explanation so far
@yanikkendler
@yanikkendler 9 ай бұрын
its so weird to see you upload a super interesting video randomly every few months lol
@henrikkniberg
@henrikkniberg 9 ай бұрын
That’s pretty much the story of my youtube channel. Random interesting stuff every few months :)
9 ай бұрын
Quality over quantity!
@PoojaSingh-fd5ng
@PoojaSingh-fd5ng 4 ай бұрын
Hi Mr. Henrik, Thank you for digging up the GPT documentation and sharing your insights. This is super great. I’m thinking to explore this capability further with #DSPy. Is it possible for you to share your notebook in the the description. Appreciate your help! With regards, yogi
@caiyongji
@caiyongji 4 ай бұрын
Yes
@No.ThatPrettyGirl
@No.ThatPrettyGirl 3 ай бұрын
lol and I just happened to stumble upon his channel today for the first time - actually, I stumbled upon his more recent and comprehensive video titled “Generative AI in a Nutshell.”😊
@honestiguana
@honestiguana 7 ай бұрын
Thank you very much, I finally understood what functions do and how they work. One more sub!
@henrikkniberg
@henrikkniberg 7 ай бұрын
Glad to help :)
@jpbeaudry8878
@jpbeaudry8878 2 ай бұрын
The image at 1:40 alone can replace reams of docs. Well done.
@dariusdbbowser6329
@dariusdbbowser6329 6 ай бұрын
This is excellent and exactly what I was looking for. A way to run a function using GPT, but my implementation will be server-side and the function will call code from a blockchain and return that data ti GPT. I was looking for a solution that wouldn't involve me having to use Python.
@ralfgustav982
@ralfgustav982 19 күн бұрын
How did I only learn about this today. This is insanely cool.
@lamacap
@lamacap 4 ай бұрын
Thanks! This video was super useful.
@WenRolland
@WenRolland Ай бұрын
Great tutorial, thanks!
@xiaomiwu4734
@xiaomiwu4734 9 ай бұрын
Learn a lot, thanks!
@nick8292
@nick8292 4 ай бұрын
Really good. Thank you.
@SuikaGameplay
@SuikaGameplay 5 ай бұрын
Great vid! Which tool did you use to create the schema? I tried some web tools and the schema didnt look quite the same as your examples. Not sure how crucial that is.
@czyngishan
@czyngishan 4 ай бұрын
Henirk, it's a great tutorial. Hope more will come ;)
@ilichpadilla2448
@ilichpadilla2448 2 ай бұрын
Great video 👌
@nathandesign98
@nathandesign98 4 ай бұрын
Very clear tutorial, thank you. Is the example code shared?
@Our__Earth
@Our__Earth 18 күн бұрын
Henrik what tool are you using here for the drawing and communication? Very nicely done.
@ilanlee3025
@ilanlee3025 3 ай бұрын
Great video thank you. Subscribed
@bingolio
@bingolio 5 ай бұрын
Excellent
@yassinebelmamoun9727
@yassinebelmamoun9727 3 ай бұрын
I'd gladly pay for more content like this! Your explanations are elegant, simple, smart, and easy to grasp. Thanks for sharing - looking forward to seeing more!
@federicoramos
@federicoramos 3 ай бұрын
Thank you!
@gauravphagre7509
@gauravphagre7509 Ай бұрын
loved the way you explain and articulate
@marka5215
@marka5215 3 ай бұрын
That was very helpful. Thank you. I take it that the setLanguages() funciton is specific to OpenAI/GPT4... is that right? If so, how would you approach this with local models?
@anazi
@anazi 4 ай бұрын
I just wish you shared the code. Its easier to follow along and go back to it. But really thank you for the great video and useful content.
@TennisFedable
@TennisFedable 2 ай бұрын
This is so cool - how do you make these animated diagrams?
@moeinhasani8718
@moeinhasani8718 2 ай бұрын
great video, just one suggestion it would b nice if you share a link to the code so afterwards we can have a look at it.
@ryangross6886
@ryangross6886 3 ай бұрын
How do I like this video twice!?!?
@AlexandreCastanet
@AlexandreCastanet 3 ай бұрын
Thanks
@eternalevanescence
@eternalevanescence 9 ай бұрын
Neat
@SogMosee
@SogMosee 7 ай бұрын
What is reflection and how can it be used in the way you suggested?
@gingerdude1010
@gingerdude1010 4 ай бұрын
Hello Henrik, great tutorial! I added a function for a 5-day weather forecast too. However, I'm encountering issues when querying high and low temperatures for the next day. The responses often contain errors, it looks at incorrect dates or temperature readings. I've tried both GPT-4 and GPT-4-0125-preview, but the issue persists. I suspect the complexity of the JSON from OpenWeatherMap might be overwhelming for the AI to parse accurately. My next step might be to pre-process the data, simplifying it and including the high and low temperatures. I had hoped GPT-4 would handle such data more capably. Any suggestions or insights on this?
@gingerdude1010
@gingerdude1010 4 ай бұрын
For anyone curious, I used chatgpt to simplify the data representation returned back from openweathermap, as it stood it was too complex for even gpt4 to reliably parse. Making a simpler representation with clearly labelled fields fixed this. I also preprocessed data calculating max and min temps.
@allpal3077
@allpal3077 8 ай бұрын
What app do you use to create those cartoon graphics?
@yaasirkhalid
@yaasirkhalid 7 ай бұрын
In the video you said there are tools to generate the function spec? can you suggest some, or I can ask ChatGPT to generate the spec for me. Again, really helpful tutorial and use cases
@henrikkniberg
@henrikkniberg 7 ай бұрын
I usually ask gpt to generate it.
@MikeRhodesIdeas
@MikeRhodesIdeas 7 ай бұрын
@henrikkniberg would you consider sharing the code for this? I kinda mostly get it.. but now need to play with it to really grok it. also you're one of the few people I've seen doing this in JS & not python. As a non-dev this is great, as I can (sort of) read JS & with gpt4 and copilot I've been able to create some useful stuff.. python though still eludes me! thanks in advance.
@xiaomiwu4734
@xiaomiwu4734 9 ай бұрын
Suggest to provide corresponding reference codes to learn better. Thanks!
@henrikkniberg
@henrikkniberg 9 ай бұрын
Good tip. Thanks! Will do so next time.
@leesmith5420
@leesmith5420 3 ай бұрын
Is there any way to specify a few functions that OpenAI can use? For example, I want to create a quiz and have 3 formats that a question can be. 1. multi-choice with 4 possible answers 2. yes/no with 2 possible answers. 3. simple question with an input for the answer I want to allow OpenAI to choose which type of function to use but always use a function (so that we always get a structured response).
@amasonofnewreno1060
@amasonofnewreno1060 7 ай бұрын
funnily for the 2 cities weather problem, you could just call getWeather with 2 cities, right? without the loop
@grossteilfahrer
@grossteilfahrer 9 ай бұрын
So, we will write the function "google search " and let it loop for a while to allow the model to learn whatever it needs and boom, we're out of the sandbox?
@honestiguana
@honestiguana 7 ай бұрын
Makes sense, but you'd have a lot of trouble parsing all the results to feed them to ChatGPT until it thinks it has enough information.
@grossteilfahrer
@grossteilfahrer 7 ай бұрын
@@honestiguana Hard but likely not impossible. What if we use Chatgpt itself to parse the results with some clever trick?
@AIonRails
@AIonRails 7 ай бұрын
ChatGPT bing search is working in same way. They just bing your request, grab X first pages, put it in context trying to answer your question using data there know and bing provided in context.
@AIonRails
@AIonRails 7 ай бұрын
@@honestiguana I think, we didn't need to provide all results, search engines is good enough. Just grab first 50 pages by your request and put it to context. Most complex task is to exclude information we need, and GPT can do it
@ekkamailax
@ekkamailax 3 ай бұрын
Is this deterministic and reliable? Can you rely on GPT to always call the correct function, pass the correct parameters, and interpret the function results accurately? If not, how is it possible to build a customer facing application with these risks? Appreciate your insight.
@caiyongji
@caiyongji 4 ай бұрын
Anyone knows what’s the whiteboard author using
@luisfernandopinto5632
@luisfernandopinto5632 8 ай бұрын
Very good video, but the free chat GPT 3.5 don't know about the existence of the openAI package, he just give code using the Rest methods to the API :(, the source code could save some time
@honestiguana
@honestiguana 7 ай бұрын
If you're still not a paying customer, you're not serious about coding with ChatGPT, and might be missing a lot of interesting features.
@cmcdonough2
@cmcdonough2 22 күн бұрын
This is wild.
@debashishbramha
@debashishbramha 4 ай бұрын
Great Henrik, Can you recomend some Book about "Prompt Engineering" ?I have given this request to you in Linkedin.Rgds,Brahma from India.
@voyageruk2002
@voyageruk2002 2 ай бұрын
GPT can now browse the internet, how does this change the use of function calling? Can we ask it to browse the web using the API?
@AutoMato-AI-Content
@AutoMato-AI-Content 3 ай бұрын
Curious, its been almost a year now, does anyone use gpt function calling?
4 ай бұрын
Omg 😳
@xspydazx
@xspydazx 20 күн бұрын
in a nutshell !! >>>> How s function calling ACTUALLY working!!! >>>> its using jupiter notebooks! executing a single cell ... so open interpreter etc is using these jupyter notebook clinet to create your funciton executor wrapper! ... the rest is instrutor(slower) and response parsing....
@villson3960
@villson3960 9 ай бұрын
Neat
@JuanMorales-bv7qr
@JuanMorales-bv7qr 9 ай бұрын
Neat
@user-se4ij
@user-se4ij 9 ай бұрын
Neat
@johandaun874
@johandaun874 9 ай бұрын
Neat
Generative AI in a Nutshell - how to survive and thrive in the age of AI
17:57
OpenAI Embeddings and Vector Databases Crash Course
18:41
Adrian Twarog
Рет қаралды 397 М.
PINK STEERING STEERING CAR
00:31
Levsob
Рет қаралды 20 МЛН
ПООСТЕРЕГИСЬ🙊🙊🙊
00:39
Chapitosiki
Рет қаралды 68 МЛН
1🥺🎉 #thankyou
00:29
はじめしゃちょー(hajime)
Рет қаралды 84 МЛН
Prompt Engineering Tutorial - Master ChatGPT and LLM Responses
41:36
freeCodeCamp.org
Рет қаралды 1,3 МЛН
OpenAI Function Calling - Full Beginner Tutorial
28:24
Dave Ebbelaar
Рет қаралды 64 М.
Function Calling in Ollama vs OpenAI
8:49
Matt Williams
Рет қаралды 26 М.
AI Pioneer Shows The Power of AI AGENTS - "The Future Is Agentic"
23:47
An Introduction to LLM Agents | From OpenAI Function Calling to LangChain Agents
31:44
Why You Shouldn't Nest Your Code
8:30
CodeAesthetic
Рет қаралды 2,6 МЛН
Minecraft terrain generation in a nutshell
25:49
Henrik Kniberg
Рет қаралды 146 М.
ChatGPT Functions - Full Tutorial for using OpenAI Functions
29:14
Adrian Twarog
Рет қаралды 85 М.
Live demo of GPT-4o coding assistant and desktop app
3:37
OpenAI
Рет қаралды 371 М.
LangGraph 101: it's better than LangChain
32:26
James Briggs
Рет қаралды 47 М.
Artur - Erekshesyn (mood video)
2:16
Artur Davletyarov
Рет қаралды 466 М.
Saǵynamyn
2:13
Қанат Ерлан - Topic
Рет қаралды 1,5 МЛН
Jaloliddin Ahmadaliyev - Yetar (Official Music Video)
8:28
NevoMusic
Рет қаралды 6 МЛН
Sadraddin - Если любишь | Official Visualizer
2:14
SADRADDIN
Рет қаралды 415 М.
Лето
2:20
MIROLYBOVA - Topic
Рет қаралды 694 М.
Ozoda - JAVOHIR ( Official Music Video )
6:37
Ozoda
Рет қаралды 1,1 МЛН