GPT function calling in a nutshell

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

Комментарии • 97

  • @jakegearhart
    @jakegearhart Год назад +30

    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  Год назад +7

      Yeah it took me a while to realize that too!

  • @StuartJ
    @StuartJ 10 дней назад

    Thank you. Your teaching methods are very clear.

  •  Год назад +13

    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.

  • @jpbeaudry8878
    @jpbeaudry8878 7 месяцев назад +2

    The image at 1:40 alone can replace reams of docs. Well done.

  • @micheldev7941
    @micheldev7941 Год назад +1

    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

  • @JuanDebrecen
    @JuanDebrecen Год назад +4

    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!

  • @yanikkendler
    @yanikkendler Год назад +26

    its so weird to see you upload a super interesting video randomly every few months lol

    • @henrikkniberg
      @henrikkniberg  Год назад +23

      That’s pretty much the story of my youtube channel. Random interesting stuff every few months :)

    •  Год назад +11

      Quality over quantity!

    • @PoojaSingh-fd5ng
      @PoojaSingh-fd5ng 9 месяцев назад +2

      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 9 месяцев назад

      Yes

    • @YesThatPrettyGirL
      @YesThatPrettyGirL 8 месяцев назад

      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.”😊

  • @KunaalNaik
    @KunaalNaik 2 месяца назад

    Superb Explanation. Helped me understand very clear!

  • @JOHNSMITH-ve3rq
    @JOHNSMITH-ve3rq Год назад +1

    You are good. Really clear presentation. Thanks.

  • @VitaminVS
    @VitaminVS 9 месяцев назад +1

    Big fan of of your presentation skills ❤

  • @RohitSharma-to7yy
    @RohitSharma-to7yy 9 месяцев назад

    Great tutorial. Easy to follow and very intuitive. Thanks a lot

  • @jeffnelson4054
    @jeffnelson4054 8 месяцев назад

    Nice work, Henrik. I think your career pivot with GAI is inspiring. Thank you!

  • @alexsandergutierrezgoncalves
    @alexsandergutierrezgoncalves Год назад +4

    This is very cool, there are many possibilities for creations

  • @JoeGlines-Automator
    @JoeGlines-Automator Год назад

    Excellent tutorial! Very well organized and clear! Your diagrams, explaining what is happening, really helped me understand the goals! Great job!

  • @GregDolan
    @GregDolan 7 месяцев назад

    Great tutorial, I'd really enjoy more of these 🙏

  • @Ariadne-c6n
    @Ariadne-c6n 3 месяца назад

    What an excellent tutorial! The maps are really visible and clear!❤❤

  • @lehuy7306
    @lehuy7306 6 месяцев назад +4

    I'm 8 months late but this is still incredibly helpful. Thanks!

    • @alfredpeter2404
      @alfredpeter2404 6 месяцев назад

      I'm 8 months and 4 days late, and I totally agree with you!

    • @dklearning2247
      @dklearning2247 5 месяцев назад

      I’m 8 months and 8 and 8 days late, but indeed it very good

  • @HazemAzim
    @HazemAzim 4 месяца назад

    perhaps the best tutorial on the mysterious and ill-explained OpenAI function calling. Thank you

    • @ts757arse
      @ts757arse 4 месяца назад +1

      Agreed. I've wanted to use these and found it very difficult to understand. It's really a very clever merging of the contextual "intelligence" or an LLM and the rigid structure and application of programming. I think the difficulty in understanding for me came from that clash.

  • @ralfgustav982
    @ralfgustav982 5 месяцев назад

    How did I only learn about this today. This is insanely cool.

  • @7509whynotresist
    @7509whynotresist 6 месяцев назад

    loved the way you explain and articulate

  • @yassinebelmamoun9727
    @yassinebelmamoun9727 8 месяцев назад

    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!

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w Год назад

    best explanation so far

  • @salesgurupro
    @salesgurupro Год назад

    This is amazing. Thanks for sharing. The whiteboard really helps visualize and understand things far more easily :)

  • @dariusdbbowser6329
    @dariusdbbowser6329 11 месяцев назад

    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.

  • @UgurMahirOzkaya
    @UgurMahirOzkaya Год назад

    Sir this video is great! thanks for sharing knowledge. have a great day

  • @Code.J
    @Code.J Год назад +2

    Great stuff! Thanks for sharing. I learned a lot from the way you explained it :D

  • @nathandesign98
    @nathandesign98 10 месяцев назад

    Very clear tutorial, thank you. Is the example code shared?

  • @honestiguana
    @honestiguana Год назад

    Thank you very much, I finally understood what functions do and how they work. One more sub!

  • @moeinhasani8718
    @moeinhasani8718 8 месяцев назад

    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.

  • @andresalexandersanabriazul5355
    @andresalexandersanabriazul5355 25 дней назад

    The best and more clear video, and i talk spanish., wow

  • @ryangross6886
    @ryangross6886 8 месяцев назад

    How do I like this video twice!?!?

  • @lamacap
    @lamacap 10 месяцев назад

    Thanks! This video was super useful.

  • @WenRolland
    @WenRolland 6 месяцев назад

    Great tutorial, thanks!

  • @ilichpadilla2448
    @ilichpadilla2448 7 месяцев назад

    Great video 👌

  • @czyngishan
    @czyngishan 9 месяцев назад

    Henirk, it's a great tutorial. Hope more will come ;)

  • @nick8292
    @nick8292 9 месяцев назад

    Really good. Thank you.

  • @bingolio
    @bingolio 10 месяцев назад

    Excellent

  • @servicesfromistanbul
    @servicesfromistanbul 5 месяцев назад

    You are the best

  • @eternalevanescence
    @eternalevanescence Год назад +5

    Neat

  • @Our__Earth
    @Our__Earth 5 месяцев назад

    Henrik what tool are you using here for the drawing and communication? Very nicely done.

  • @marka5215
    @marka5215 9 месяцев назад

    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?

  • @SuikaGameplay
    @SuikaGameplay 10 месяцев назад

    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.

  • @yaasirkhalid
    @yaasirkhalid Год назад +1

    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

  • @TennisFedable
    @TennisFedable 8 месяцев назад +1

    This is so cool - how do you make these animated diagrams?

  • @ilanlee3025
    @ilanlee3025 8 месяцев назад

    Great video thank you. Subscribed

  • @xiaomiwu4734
    @xiaomiwu4734 Год назад

    Learn a lot, thanks!

  • @federicoramos
    @federicoramos 9 месяцев назад

    Thank you!

  • @imnbsp
    @imnbsp 5 месяцев назад

    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 👍

  • @grossteilfahrer
    @grossteilfahrer Год назад +3

    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 Год назад

      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 Год назад

      @@honestiguana Hard but likely not impossible. What if we use Chatgpt itself to parse the results with some clever trick?

    • @AIonRails
      @AIonRails Год назад

      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 Год назад +1

      @@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

  • @jonnysaxon
    @jonnysaxon 3 месяца назад

    Very new to this but how did the gpt know which were the largest 3 cities when reporting on the weather?

  • @leesmith5420
    @leesmith5420 8 месяцев назад

    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).

  • @gingerdude1010
    @gingerdude1010 9 месяцев назад

    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 9 месяцев назад

      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.

  • @MikeRhodesIdeas
    @MikeRhodesIdeas Год назад

    @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.

  • @SogMosee
    @SogMosee Год назад

    What is reflection and how can it be used in the way you suggested?

  • @ekkamailax
    @ekkamailax 8 месяцев назад

    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.

  • @AlexandreCastanet
    @AlexandreCastanet 8 месяцев назад

    Thanks

  • @xiaomiwu4734
    @xiaomiwu4734 Год назад

    Suggest to provide corresponding reference codes to learn better. Thanks!

  • @amasonofnewreno1060
    @amasonofnewreno1060 Год назад

    funnily for the 2 cities weather problem, you could just call getWeather with 2 cities, right? without the loop

  • @debashishbramha
    @debashishbramha 9 месяцев назад

    Great Henrik, Can you recomend some Book about "Prompt Engineering" ?I have given this request to you in Linkedin.Rgds,Brahma from India.

  • @cmcdonough2
    @cmcdonough2 5 месяцев назад

    This is wild.

  • @xspydazx
    @xspydazx 5 месяцев назад +1

    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....

  • @voyageruk2002
    @voyageruk2002 7 месяцев назад

    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?

  • @caiyongji
    @caiyongji 9 месяцев назад

    Anyone knows what’s the whiteboard author using

  • @luisfernandopinto5632
    @luisfernandopinto5632 Год назад

    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 Год назад

      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.

  • @allpal3077
    @allpal3077 Год назад

    What app do you use to create those cartoon graphics?

  • @AutoMato-AI-Content
    @AutoMato-AI-Content 8 месяцев назад

    Curious, its been almost a year now, does anyone use gpt function calling?

  • @alexgordon951
    @alexgordon951 2 месяца назад

    Not another weather function

  •  9 месяцев назад

    Omg 😳

  • @user-se4ij
    @user-se4ij Год назад +1

    Neat

  • @JuanMorales-bv7qr
    @JuanMorales-bv7qr Год назад +1

    Neat

  • @villson3960
    @villson3960 Год назад +1

    Neat

  • @johandaun874
    @johandaun874 Год назад

    Neat