OpenAI Function Calling - Full Beginner Tutorial

  Рет қаралды 82,155

Dave Ebbelaar

Dave Ebbelaar

Күн бұрын

Пікірлер: 118
@daveebbelaar
@daveebbelaar Жыл бұрын
👉🏻Learn more about data science and AI: www.datalumina.io/newsletter
@JethiyaChampakGada
@JethiyaChampakGada 10 ай бұрын
I watched a few tutorials but every one just went through plain code, but this man is exceptional he put in so much effort to make us really understand what is going on
@bugglebegger143
@bugglebegger143 Жыл бұрын
I watched 4 or so tutorial videos about functions and they just really didn't explain it well. Best one so far, and I really feel I get it now. Important thing to realize when starting off is that the descriptions are of central importance, you're essentially prompting GPT in the descriptions for how to respond. Functions seem to basically just be a way to format GPTs responses in a much more rigid manner and use their AI in a more controlled way to get the kind of information you want so you can use it how you want.
@SwingingInTheHood
@SwingingInTheHood Жыл бұрын
"This should put you ahead of most people in understanding how these function calling methods work." I have to give it to you, you did an excellent job breaking it down. I've been working with OpenAI models for 8 months, primarily building a RAG application but also dabbling in Text to SQL. Didn't really understand how functions worked until this video. And I particularly like the fact that you went through the business logic of this thing rather than the programming specific logic. I am a PHP programmer, so seeing the logic flow visually was super-helpful. Great job. Bravo!
@lordmelbury7174
@lordmelbury7174 Жыл бұрын
Great that you don't just use the default examples, many channels are guilty of that! I have just subscribed!
@maciej.wolosewicz
@maciej.wolosewicz 4 ай бұрын
Wow, what an incredible video! I've watched countless tutorials and read numerous articles on OpenAI function calling, but your explanation was crystal clear and finally made everything click for me. Thank you so much for sharing your knowledge in such an understandable and engaging way. You're a lifesaver! Keep up the fantastic work!
@Ray_1998_
@Ray_1998_ 7 ай бұрын
Amazing tutorial! The gradual scaling in complexity really helped me understand the concepts in clear terms. Thanks 😊
@jag-dt1lp
@jag-dt1lp 5 ай бұрын
honestly this is actually 10/10 thanks dude
@sankhachakraborty5801
@sankhachakraborty5801 11 ай бұрын
This is a brilliant walkthrough of the concept. Couldn't have asked for a better one. Excellent video Dave!
@nebinebi123
@nebinebi123 4 ай бұрын
This is also very useful for having structured data to send to a front end in RAG applications.
@pareak
@pareak Жыл бұрын
The first 10 minutes really helped me a lot!
@frankkuipers2024
@frankkuipers2024 Жыл бұрын
Thank voor de video man! Heb al een poosje geen openai meer gebruikt maar deze functies zijn wel echt heel interessant
@arbengb
@arbengb Жыл бұрын
Great video. Just came in so clutch for me. Thanks a ton Dave. I appreciate you putting this together.
@daveebbelaar
@daveebbelaar Жыл бұрын
🙏🏻
@hourglass8450
@hourglass8450 Жыл бұрын
Thank you! Good move and idea to be able to call functions and get results for processing with OpenAI. Opens up a lot of doors with integrating LLM to application backends.
@lixiasong3459
@lixiasong3459 Жыл бұрын
Wow, Dave! This is absolutely awesome! Your talent and dedication are truly inspiring. Thanks a lot for sharing this incredible content with us. This is exactly what I need right now. Keep up the fantastic work, my friend! I'll definitely be eagerly waiting for more amazing videos from you. Kudos to you and your amazing talent!
@JakubGaniaSoftware
@JakubGaniaSoftware Жыл бұрын
I totally agree. I have exactly the same opinion, you wrote it very well!
@daveebbelaar
@daveebbelaar Жыл бұрын
What a great way to start my day, thanks!! 🙏🏻
@brandongillins
@brandongillins Жыл бұрын
Dave, love your videos best notification of the day, always! Finally got access to GPT-4 api! Let’s go test out some function calling!
@Lexqueso
@Lexqueso 7 ай бұрын
Thanks man, i dont understand the documentation from the page, your video helps a lot
@EmilioGagliardi
@EmilioGagliardi Жыл бұрын
great tutoiral and explanation. thanks! I also want to learn how you use the ipython session to view the contents of your variables, I'm just learning how to use VS Code so that is a really neat feature. Its still so abstract that its hard to wrap your brain around it. but it is what it is :D
@sourabmangrulkar9105
@sourabmangrulkar9105 10 ай бұрын
Thank you for a nice overview of function calling!
@seallyolme
@seallyolme 8 ай бұрын
This is one of the most comprehensive tutorials that breaks down function calling in a simple manner. In the conversational example, you had to manually call the function 4 times to get the response you wanted. Is there a way to do this so that we can just iterate over the responses and the AI automatically knows when to stop iterating?
@planplay5921
@planplay5921 11 ай бұрын
I have a question: do I have to write code repeatedly to make LLM respond to the first, second, third, or more responses? can't LLM get the function that should be executed in a prompt at once?
@lvterry
@lvterry 4 ай бұрын
clear explanation of function calling. well done!
@aipujols
@aipujols Жыл бұрын
Hi Dave, great Function Calling tutorial video, thanks a lot!
@omnamahsivaya9009
@omnamahsivaya9009 4 ай бұрын
Thank you Dave Ebbelaar, it was very helpful. What is the difference between the tools and functions?
@robinbreed2439
@robinbreed2439 4 ай бұрын
Nice video thank you man. I'll need to dive in some more, its an interesting topic
@alirezaf6746
@alirezaf6746 4 ай бұрын
Thanks for explaining the function calling principle clearly. I am wondering how I can use function calling to call a RESTful API that requires an OAuth mechanism. For example, in your demonstration, to connect to an airline and buy a ticket, the user would need to log in and authenticate to be able to purchase a ticket. It would be great if you could describe this process or at least give me some guidance. I know it is possible to use ChatGPT and define custom GPTs, using the OpenAPI specification to call a REST API over HTTP(S). I have already implemented a custom GPT that calls a REST API requiring OAuth, and when authentication is needed, it prompts the user to log in. However, I do not know how to use or implement the same thing in my project and handle the OAuth mechanism when it is needed.
@MohamedTlili-m7z
@MohamedTlili-m7z Жыл бұрын
Great tutorial, at 3:35 how were you able to view the Completion variable using a keyboard shortcut? is it some kind of extension?
@catalincrisan4840
@catalincrisan4840 Жыл бұрын
Wow, this is so cool man! I run a tech startup where I'm looking to add chatbot functionality. I would love to chat more with you on this
@russgo4953
@russgo4953 10 ай бұрын
Hey Dave, can i use the function calling in assistants too? So function parameter would be set in the client.beta.threads.messages.create i think?
@afonsoalcantara
@afonsoalcantara 4 ай бұрын
Awesome tutorial. Is there a way to make OpenAI to ask for a missing information? For instance, the user only informs the loc_origin.
@raghavachowdary8658
@raghavachowdary8658 6 ай бұрын
Excellent explanation. Thank you :)
@axioworks
@axioworks Жыл бұрын
Excellent tutorial, right down to the point, thank you!
@GergelyGyurics
@GergelyGyurics 4 ай бұрын
Great demonstration, have like good sir'
@gsstargamer
@gsstargamer Жыл бұрын
Top notch info right here.
@daveebbelaar
@daveebbelaar Жыл бұрын
🙏🏻
@BasudevBharat-f8p
@BasudevBharat-f8p Жыл бұрын
Hey Dave, could you please tell me, what's the shortcut key you are using to run the selected line of code directly in the interactive window?
@titi_build
@titi_build Жыл бұрын
PLEASE YESS!! hahah i was exactly looking for that comment man haha
@israeabdelbar8994
@israeabdelbar8994 8 ай бұрын
Huge thanks for the useful video 😊. I'm wondering whether you know how to deal with missing data within the prompt, for instance for the get flight info, imagine the user doesn't provide the destination, is the LLM has the ability to detect that, and back to the user ask him to provide missing info which is in this case the destination name?
@morthajagan1757
@morthajagan1757 2 ай бұрын
Great work!
@justinwr092
@justinwr092 Жыл бұрын
this is incredible. and such a helpful video! thank you, it was just what I needed.
@supa1009
@supa1009 Жыл бұрын
great video Dave, thank you it was very useful!
@sharhadbashar9772
@sharhadbashar9772 2 ай бұрын
for the langchain example, how do you know when to stop? What if i dont know theres only 4 questions? what if there are multiple questions? how will i know when i have successfully answered all the users questions?
@titi_build
@titi_build Жыл бұрын
Awesome video man, thanks a ton!
@daveebbelaar
@daveebbelaar 11 ай бұрын
Glad you liked it!
3 ай бұрын
Thank you! :) That was very clear, thank you very much! :)
@micbab-vg2mu
@micbab-vg2mu Жыл бұрын
Dave, fantastic video! Thanks for sharing. I was wondering if you could make a future video about the ChatGPT - Code Interpreter. I'm really curious to know if it's reliable enough to use in my Data Science workflow. Currently, I find myself doing a lot of copying and pasting between GPT-4 and Python, so I'm excited to see if the Code Interpreter can streamline this process.
@tancheeken
@tancheeken 10 ай бұрын
At 14:23, you use eval(function_call.name) to reference to function. Since there is only one function, wouldn't it be better to do without eval and call the function(**params) directly?
@annasc8280
@annasc8280 2 ай бұрын
Thanks a lot! How do I call a 'function' from my assistant on the N8N?
@tonymathew9469
@tonymathew9469 5 ай бұрын
Do you know how I can implement user confirmation flow? Say that I have a function with few parameters, and I want to get confirmation from user if the function can be called with the parameters
@holacuba2001
@holacuba2001 9 ай бұрын
All brilliant and excellent learning material! But at 22:08 you have written the user input very nicely yourself, with all required parameters in place. This obviously is not the real life scenario. In my experience if the user omits one of the two required parameters the system will ask for it... and forget the already supplied parameter. Anyway, I profited here by learning how the functions work, how multiple functions work, and what is that "auto" parameter. Thanks.
@Phobos221B
@Phobos221B 4 ай бұрын
Can you try something like this with Langfuse ?
@kevon217
@kevon217 Жыл бұрын
Another banger of a video!
@daveebbelaar
@daveebbelaar Жыл бұрын
🙏🏻⚡️
@shukrantpatil
@shukrantpatil 8 ай бұрын
Is it possible to deploy a particular assistant which I have created in the assistant builder using the assistant ID ??
9 ай бұрын
This will work different now for Assistants?
@rachadlakis1
@rachadlakis1 Жыл бұрын
THank you for ur effort
@daveebbelaar
@daveebbelaar 11 ай бұрын
It's my pleasure!
@SouravDey-i2e
@SouravDey-i2e 8 ай бұрын
its assuming the parameters but is should ask the required arguments
@YouBetterBeYou
@YouBetterBeYou Жыл бұрын
That is awesome. Quick question: Is a second_completion necessary for the iteration on the user response? Can we not just use the function-call to also provide this iterated version of the response and read that out at the same time? So the question is, I guess, is the function applied AFTER the response is generated or does the function heavily restrict the response BEFORE it is generated. Given the statistical nature of the response mechanism I don't really see how it can do this beforehand and still guarantee a consistent outcome. But if it is after the response, then it is basically a way to iterate on the generated response by either restructuring or even semantically refelct on it (?)
@yixinsong
@yixinsong Жыл бұрын
Hi Dave, thanks for this really good video! What is the plugin you are using in this video to show the response? (the one ends with .interactive)
@leobeeson1
@leobeeson1 11 ай бұрын
kzbin.info/www/bejne/sKbPeICPnJWpbLcsi=OeTp5Kf-wH_1OHH4&t=863 This feature was the reason I migrated from PyCharm to VSCode, and the best thing is I've never had to touch a bloody Jupyter notebook again (well, except for in Google Colab but that's force majeure).
@techiteasyaus
@techiteasyaus 11 ай бұрын
Thanks Dave, very educational. I am in the process of converting the code to the latest openai API (1.6) as the completion API has changed. This is a good exercise as it forces me to rewrite the syntax of the functions and of the API calls. I've got it running but the last part with Langchain isn't working, it crashes at llm.predict_messages, no idea why. Cheers.
@גילגליקשטרן
@גילגליקשטרן 4 ай бұрын
hi did you figure it out how to handle this?
@JaeHoSong
@JaeHoSong Жыл бұрын
Great!! Thank you. This helped a lot.👍
@daveebbelaar
@daveebbelaar Жыл бұрын
Thanks!
@RAMOLLAPRAKASH
@RAMOLLAPRAKASH 9 ай бұрын
Thank you .
@myheart4355
@myheart4355 5 ай бұрын
Hi, I have trained a model, but when I try to integrate it into my project, I receive an error message: "The model gpt-3.5-turbo-0125:model1234 does not exist or you do not have access." How can I overcome this issue? Can you guide me on this?
@enatsutoru7377
@enatsutoru7377 9 ай бұрын
what is the plug-in name? It’s useful
@agedbytes82
@agedbytes82 Жыл бұрын
Thank you!
@robinchriqui2407
@robinchriqui2407 Жыл бұрын
Thank you Dave, do you think we will see new kind of jobs related to OpenAi?
@shafiqahmad9057
@shafiqahmad9057 2 ай бұрын
whenever I provide output.tool_calls.name with name key it give the error that expecting object and string has been given could you please guide me regarding this
@shraey2021
@shraey2021 Жыл бұрын
You reckon then this replace the whole need of Tools in Langchain? or the need for Langchain altogether?
@daveebbelaar
@daveebbelaar Жыл бұрын
This will definitely change things as the LangChain tools are essentially doing this under the hood. They will likely update the library to pick tools based on function calling.
@drowsypostman
@drowsypostman Жыл бұрын
I have a major issue, I automated the function calling but it does not always call the correct function, I need to leave it on auto so it decides when it is time to call a function. How can I make sure it always calls correct function? Function description is not working. It just calls the functions randomly
@Amit-bq1gj
@Amit-bq1gj Жыл бұрын
do I have to pay for function calls as well, suppose I have 100 functions, so would each time these function cost added?
@Reviews_by_Ryan
@Reviews_by_Ryan Жыл бұрын
Hey Dave! Have you gotten gpt to run a function twice? For instance if the prompt is "Create two events.. here are their details..." But the function call only creates 1 event at a time, and gpt only returns details for one at a time.
@colkbassad
@colkbassad Жыл бұрын
Try passing "two" as an int parameter in your function (and function_description) as an iteration amount and have the return value a list instead. I have no idea if this would work, I'm still getting a grasp on function calling.
@broskmohammad8169
@broskmohammad8169 Жыл бұрын
are the python files you just ran saved somewhere ?
@RAMOLLAPRAKASH
@RAMOLLAPRAKASH 9 ай бұрын
same can you please do one video on the function call on Gemini Ai ?
@markp2381
@markp2381 Жыл бұрын
Can the properties be anything else other than object?
@YEM_
@YEM_ Жыл бұрын
At 15:30 ish, how did it suddenly get internet access? I don't see where we enabled that.
@titi_build
@titi_build Жыл бұрын
he faked an API call, and returned some hard coded data from his function
@shubhamverma2531
@shubhamverma2531 8 ай бұрын
what plugin you are using for interactive CLI.
@daveebbelaar
@daveebbelaar 8 ай бұрын
More info on that here: kzbin.info/www/bejne/aaSsq3Z8qrGaf7M
@siddheshwarpandhare1698
@siddheshwarpandhare1698 Ай бұрын
Hi Dave, I am developing ai agent and using function calling. After getting data from api to by function. LLM need to do series of steps on function call response data but llm is only doing first manipulation step Can you help on this issue.
@aryanjain5535
@aryanjain5535 6 күн бұрын
can u explain what's an AI Agent
@deathspainvincentblood6745
@deathspainvincentblood6745 Жыл бұрын
can u compare theme between programming helper 1990s vs CHAT GPT the programming helper there's no errors code depend on ur personal if u not believe me u can try programming helper and plus u r helping people
@JazevoAudiosurf
@JazevoAudiosurf Жыл бұрын
any way to make it more likely to call the function?
@nengshengqian
@nengshengqian 10 ай бұрын
Great!!
@echandiac
@echandiac 9 ай бұрын
is this just for python? is it posible to do this on php?
@justicecalderon6641
@justicecalderon6641 Жыл бұрын
What screen recording software do you use?
@daveebbelaar
@daveebbelaar Жыл бұрын
Ecamm
@vishalpachpande5921
@vishalpachpande5921 5 ай бұрын
Yea but how to put this into any production
@goranceurukic8185
@goranceurukic8185 Жыл бұрын
Please don't use eval, result can be something unexpected and you can end up leaking unwanted parts of code/information
@daveebbelaar
@daveebbelaar Жыл бұрын
Thanks for the tip!
@santiagobattezzati7895
@santiagobattezzati7895 Жыл бұрын
In real life, some times the user won t provide all the info you need for calling your function. How would you do to make GPT ask again for the missing information before calling the function.
@andrewwilliams5773
@andrewwilliams5773 8 ай бұрын
You make one of the defined functions "get_complete_info(function_def, required_fields)" which itself calls an AI response to request this from the user. Then process the response and return the required_fields to the original function.
@tijldeclerck7772
@tijldeclerck7772 Жыл бұрын
Hollander!
@archiee1337
@archiee1337 Жыл бұрын
Gold
@keithconner3982
@keithconner3982 11 ай бұрын
These videos would be stellar if they didn't have the background music-noise which is extremely annoying.
@parkersettle460
@parkersettle460 9 ай бұрын
Has anyone tried this with a webhook?
@KilianMpoint
@KilianMpoint 11 ай бұрын
please cut the very high frequency when you speak, maybe you don't hear that frequency but it's horrible, cut above 15000/15500 hz, please 🙏🙏
@daveebbelaar
@daveebbelaar 11 ай бұрын
I will look into this, thanks! I don't hear it myself.
@Celso-tb6eb
@Celso-tb6eb 7 ай бұрын
all good, but did the bg music puts me to sleep why you put it
@daveebbelaar
@daveebbelaar 7 ай бұрын
Sleep is good for you
@SilvioAltmann-ek9rw
@SilvioAltmann-ek9rw 10 ай бұрын
OMG this is soooo cool! How amazing is this?? Love it. So I just add a random function the way it should be and the calling system is expected to return the right response..... YAYYY!°!!!111🍆💦
@Mis_guidedz
@Mis_guidedz Жыл бұрын
Wtf
@awsick
@awsick Жыл бұрын
Please do not recommend that folks casually use the `eval` function - that's pretty dangerous!
@RanaAnas-s2h
@RanaAnas-s2h 10 ай бұрын
well explained
@АндрейТ-г4ж
@АндрейТ-г4ж Жыл бұрын
Still super unstable( and can't help u reduce gpt requests and even consume more tokens. I hope this helps to transform original answer into answers with params: like { "message": { "role": "assistant", "content": "reply", "": "param0", "": "param01" } }
OpenAI Structured Output - All You Need to Know
24:46
Dave Ebbelaar
Рет қаралды 33 М.
GPT function calling in a nutshell
15:36
Henrik Kniberg
Рет қаралды 48 М.
Amazing remote control#devil  #lilith #funny #shorts
00:30
Devil Lilith
Рет қаралды 15 МЛН
Trick-or-Treating in a Rush. Part 2
00:37
Daniel LaBelle
Рет қаралды 45 МЛН
Happy birthday to you by Secret Vlog
00:12
Secret Vlog
Рет қаралды 6 МЛН
OpenAI Assistants Tutorial for Beginners
27:03
Dave Ebbelaar
Рет қаралды 68 М.
I Tried Every AI Coding Assistant
24:50
Conner Ardman
Рет қаралды 850 М.
An Introduction to LLM Agents | From OpenAI Function Calling to LangChain Agents
31:44
ChatGPT Functions - Full Tutorial for using OpenAI Functions
29:14
Adrian Twarog
Рет қаралды 93 М.
OpenAI Embeddings and Vector Databases Crash Course
18:41
Adrian Twarog
Рет қаралды 495 М.
Function Calling in Ollama vs OpenAI
8:49
Matt Williams
Рет қаралды 37 М.
I Analyzed My Finance With Local LLMs
17:51
Thu Vu data analytics
Рет қаралды 494 М.
Build Your Own Auto-GPT Apps with LangChain (Python Tutorial)
29:44
Dave Ebbelaar
Рет қаралды 204 М.
Amazing remote control#devil  #lilith #funny #shorts
00:30
Devil Lilith
Рет қаралды 15 МЛН