OpenAI GPT-4 Function Calling: Unlimited Potential

  Рет қаралды 226,762

sentdex

sentdex

Жыл бұрын

Function calling is a new capability for OpenAI's GPT-4 and GPT-3.5 via the API. Function-calling allows you to extract structured outputs from the GPT model.
Github notebook: github.com/Sentdex/ChatGPT-AP...
Neural Networks from Scratch book: nnfs.io
Channel membership: / @sentdex
Discord: / discord
Reddit: / sentdex
Support the content: pythonprogramming.net/support...
Twitter: / sentdex
Instagram: / sentdex
Facebook: / pythonprogramming.net
Twitch: / sentdex

Пікірлер: 322
@sciencelab4225
@sciencelab4225 Жыл бұрын
Wow this is what I always wanted! It was so cumbersome to get this functionality before. Now it's supported and reliable! Your idea of providing functions which don't exist is awesome, I would have never thought about that 😮
@finnbuhse4775
@finnbuhse4775 11 ай бұрын
Big love for you my bro. I remember when I was first introduced to Python in what you would call elementary school and I loved it. So I went home to watch your Python game tutorials (the tank one was my favorite, even tho I had no clue even what a quadratic was, somehow I got it to work lol). Completing those felt so rewarding and it really inspired me. Now I'm 19 and soon to be an apprentice at a software company which was my goal. Seeing this video from you after so long felt nostalgic and I'm so happy to see that you're still making videos. You make dreams come true you absolute legend.
@sebastianelghaity5685
@sebastianelghaity5685 11 ай бұрын
wholesome ass comment man congrats on your future success
@simply.nonchalant6006
@simply.nonchalant6006 8 ай бұрын
Same here man! :) It's crazy to see others on the internet on the same journey. sentdex is the 🐐
@princemars6746
@princemars6746 Жыл бұрын
His authentic happiness shows just how much of a bombshell function calling will be, and for them to nonchalantly release it is interesting.
@zorawarsingh11
@zorawarsingh11 Жыл бұрын
…John Connor rolling over in his grave
@kevinmaillet8017
@kevinmaillet8017 11 ай бұрын
Sometimes I think they’re watching me when I’m in there with ChatGPT. For over six months I’ve been using JSON schemas to get out structured data. It makes the reliability of the response significantly better.
@thequestion3953
@thequestion3953 9 ай бұрын
Aaron Jack had this same response when GPT-2 was released and I completely glossed over it. This was around 2 years ago. He was getting extremely excited. Function calling is most likely going to be a big deal in the hands of devs that know what to do with it. kzfaq.info/get/bejne/oreef9qGy93LqXU.html
@getgonged
@getgonged Жыл бұрын
Been hoping to see a video on this new feature. Everyone is talking about the larger 16k context but not much mention about these intelligent functions. This is a game changer. Great explanation & great job!!
@jzam5426
@jzam5426 10 ай бұрын
21:18 - THIS!! I've been reading blogs and watching videos about function calls wanting to really understand what all the fuzz was about and no one, NO ONE has highlighted this extremely important point more than you did. THANK YOU!!!
@software_development
@software_development 11 ай бұрын
This is EXACTLY what my business partner and I have needed for our project, can’t wait to implement this!
@jeffreycordova9082
@jeffreycordova9082 Жыл бұрын
This is actually very cool. It's definitely tough to constrain the response to something that can be reliably integrated into a system. It seems like with this new feature we can now directly pass these constrained responses into an api. Super cool.
@bobsalita3417
@bobsalita3417 Жыл бұрын
Looked at other videos then replayed yours. Finally clicked. Your stream of consciousness chatter and enthusiasm was tops.
@MarkWernsdorfer
@MarkWernsdorfer Жыл бұрын
awesome. you're always presenting sth extra nice in addition to only raw functionality.
@clivebird5729
@clivebird5729 Жыл бұрын
Returning structured data using a function_call is awesome. Thank you!
@dirty_haute
@dirty_haute Жыл бұрын
Slick. Much better than the, "Give me the results in the following json format {'foo':'bar'}" that was required before. Im excited to try a set up 2 functions for input to gpt as well as output.
@dawid_dahl
@dawid_dahl 9 ай бұрын
Just want to thank you again for this awesome video. I’m a dev as well and I’ll be holding a presentation at my company on Friday, echoing a lot of the amazing points I learned in this video. It really seems like people haven’t really understood how powerful this Function Calling feature really is. This video I feel is the only one where the true potential of this new tech is revealed, with how *any* kind of structured data can be generated using the almost magical smarts of these LLM systems.
@TeamUpWithAI
@TeamUpWithAI 11 ай бұрын
Aww your genuine enthusiasm made this so much more engaging and entertaining :)
@redship7532
@redship7532 Жыл бұрын
Now the trick is to implement this into an assistant, and if the current input cannot find a function, we ask to program, to ask gpt4 to create this function syntax with the description and anything + the actual code that would execute this function, an auto-writing/evolutive AI assistant
@darke7777
@darke7777 Жыл бұрын
This is definitely a different way than I thought of using function calls, very interesting
@adandrea
@adandrea Жыл бұрын
Kudos man, what you did with this is awesome, very creative!
@BlueyMcPhluey
@BlueyMcPhluey Жыл бұрын
Thanks for covering this. It's funny, I feel like simultaneously this opens up so many doors, but also I have no idea what those doors could even be. I find it really hard to think of applications for this kind of thing
@GuinessOriginal
@GuinessOriginal Жыл бұрын
Ask gpt, it will come up with a range of suggestions.
@BlueyMcPhluey
@BlueyMcPhluey Жыл бұрын
@@GuinessOriginal good idea! Its results made me realise the most interesting potential applications to me come from speech to text and then feeding that result to the new GPT API to perform actions.
@jas4768
@jas4768 Жыл бұрын
Ask GPT to do your thinking for you
@illustratum42
@illustratum42 11 ай бұрын
This is how I imagine the programming in star trek. If you've ever watched the show and someone writes a program or a subroutine, I imagine their just putting in basic functions and descriptions and the computer turns it into actual code. This is so cool and I am super hyped to see this evolve
@KP-sg9fm
@KP-sg9fm 11 ай бұрын
The ultimate programming language would just be in pure English so that makes sense
@illustratum42
@illustratum42 11 ай бұрын
@KP-sg9fm that's why I love python. It's pretty dang close...
@AIonRails
@AIonRails 7 ай бұрын
I'm sure it will soon be a reality. Can you imagine how many side effects could occur in large-scale software that is entirely produced by AI? I'm not a pessimist; I just want to imagine what new challenges software engineers will face
@alejandroraulleivailabaca5749
@alejandroraulleivailabaca5749 Жыл бұрын
This is so cool, I've been nerding out this last days rewriting the whole code of my chatbot to use function calls. Weird fact: it seems that functions are still in some part of the system prompt, and when you ask particular questions like "how can I get the weather?", gpt will respond "using the 'get_weather' function, to which you have to specify your location".
@danielpaull309
@danielpaull309 Жыл бұрын
I actually made a system to do this back in April and it was a lot of work!! This is great. My system had a function with description, parameters etc and then vectorise the description, then when you could ask the bot to do a task and it would search the index for the closest match to the task and use ChatGPT to get the parameters from the original task and if it needed more requests it from the user. (I also had a loop to write a function if the function didn’t exist which for basic tasks worked about 80% of the time). It would then execute the function and return the result.
@marilynlucas5128
@marilynlucas5128 Жыл бұрын
😊Good job! You should start a KZfaq channel. Your ideas are dope!
@danielpaull309
@danielpaull309 Жыл бұрын
@@marilynlucas5128 I've thought about it... but I find the joy in making the stuff and I know how much work goes into running and managing a channel so for now just sticking to the dev side of things :)
@marilynlucas5128
@marilynlucas5128 Жыл бұрын
@@danielpaull309 just press record!
@ko-Daegu
@ko-Daegu Жыл бұрын
that's basically LangChain tools with agents free and open source
@countofst.germain6417
@countofst.germain6417 Жыл бұрын
Good work you were quick with this one.
@alexdacat
@alexdacat Жыл бұрын
I'm using ChatGPT to make a choose your own adventure game, and this looks like a perfect way to get back JSON that is formatted correctly! I can get it correctly 70% of the time, but this looks perfect
@iamxenobyte
@iamxenobyte 11 ай бұрын
need music for that game? :)
@alexdacat
@alexdacat 11 ай бұрын
@@iamxenobyte Sure!
@ness3963
@ness3963 11 ай бұрын
Do you know how you would 'force' it to call a function? I'm having trouble with it in my own project
@alexdacat
@alexdacat 11 ай бұрын
@@ness3963 At this point I have not tried integrating this into that project. But I will let you know when I get to it!
@Shaunmcdonogh-shaunsurfing
@Shaunmcdonogh-shaunsurfing Жыл бұрын
“AI functions” (see Marvin and AutoGPT projects) have been a thing for a while. We’ve had some work arounds but it’s nice this exists now. Definitely a step forward
@unconv
@unconv Жыл бұрын
I gave it filesystem functions to write and read files and it can create multi-file applications from a single prompt now (with recursive prompting)
@GoldnetGaming
@GoldnetGaming Жыл бұрын
I think you could probably have hundreds of functions stored somewhere in SQL or a vector database and use a search function (any algorithm really) to get the top X relevant/necessary commands. With this new feature you could even let the LLM write an array of queries to use for searching relevant commands. After that you would then pass that into the functions array with the prompt like you showed. I know that would be an additional prompt, but in the long run, that would probably be cheaper than filling up the context size with all existing commands!
@MarkFobert
@MarkFobert Жыл бұрын
​@ThomasTomiczek you can provide a function that let's gpt ask for a function
@GuinessOriginal
@GuinessOriginal Жыл бұрын
Couldn’t you get an LLM to a) suggest useful functions that currently don’t exist and b) write them for you?
@GuinessOriginal
@GuinessOriginal Жыл бұрын
@@MarkFobertin fact write a function that generates functions, like a prompt generating prompt
@skylark8828
@skylark8828 Жыл бұрын
Yes great idea, I want it to write me detailed specs that can be turned into actual code
@GuinessOriginal
@GuinessOriginal Жыл бұрын
@@skylark8828 gpt can do that. And if you give them to gpt engineer it’ll code the whole thing for you
@garbagechannel6514
@garbagechannel6514 10 ай бұрын
Your whole channel is full of cool stuff I'd like to do. I'm just commenting to let KZfaq's Algo know I want more recommendations from this channel.
@ajnart_
@ajnart_ Жыл бұрын
6:12 warranted a like from me. It's nice to see how enthusiastic you are about this
@christianwooldridge406
@christianwooldridge406 Жыл бұрын
In the past I made a home assistant that required this type of functionality. The way I achieved it was through fine tuning a model which was kinda pain because I had to make a bunch of training data but it did work very well. Excited to see if this works better then my approach
@noahsplayground2564
@noahsplayground2564 9 ай бұрын
Yeah I’m doing the same thing with a fine tuned model, using a system prompt over and over in my training data to ensure that based on the user content, the assistant response is this nice structured format…so I guess this function calling replaces that?
@noahsplayground2564
@noahsplayground2564 9 ай бұрын
I’m also using the fine tuned model because I want the output to use specific names that are found in a separate dataset so I can essentially have that connection between what GPT is responding with and what I meta data I have in my dataset
@Massenko
@Massenko Жыл бұрын
Awesome, thanks a lot for this demo ❤
@willholland1697
@willholland1697 Жыл бұрын
Great video. To tell gpt to produce content as well as a function call you could try adding a function argument named something like "comment" or "description" which gpt would populate with a string. For get_commands, I feel like the problem you've noticed there is that you've written it from YOUR perspective not from gpts. You the user are calling a getter... but for gpt it's not calling a getter because its writing the commands. I think it'd be more effective to call it "put_commands" or "call_commands" as its more descriptive to gpt
@obliojoe
@obliojoe Жыл бұрын
Thanks for sharing this... I only had a minimal sense if what this feature provided. This is really cool!
@jeffreycooper6163
@jeffreycooper6163 Жыл бұрын
Dude - you continue to provide the best content for a technical audience. Can I give you money or something? It's been like 10 years of just binging your content and getting inspiration and training for so many great things.
@jaredhead9503
@jaredhead9503 11 ай бұрын
There's a join button that pays him $4.99/month
@danielb.2873
@danielb.2873 Жыл бұрын
This is HUGE! Pretty much what's needed to embed AI anywhere.
@memespdf
@memespdf Жыл бұрын
It should be possible to write a Python library that automatically extracts GPT function specs from functions with docstrings. Perhaps a `@openai` decorator would be cool
@avidrucker
@avidrucker Жыл бұрын
Love it!
@sentdex
@sentdex Жыл бұрын
Hah, this is a great idea!
@wg2
@wg2 Жыл бұрын
WRITE THAT DOWN WRITE THAT DOWN, in all seriousness GPT should be able to get automatically get context from well-documented functions
@illeatmyhat
@illeatmyhat Жыл бұрын
It's just an OpenAPI operation spec
@FranAbenza
@FranAbenza Жыл бұрын
Mojo?
@adamrozycki9822
@adamrozycki9822 Жыл бұрын
Great explanations, cheers! 👌
@grafzhl
@grafzhl Жыл бұрын
This is a tilde ~, what you mean is a backtick ` 😁 Cool explaination!
@FlyingScot911
@FlyingScot911 11 ай бұрын
Ha ha yes. As I watched the video I kept asking myself. Where are the tilde he keeps on about...?
@trentleslie2888
@trentleslie2888 Жыл бұрын
So stoked you covered this. Getting creative output in a structured format is huge due to its contradictory goals. I assume you can still change temperature? I didn't see anything about that, guess I'll just have to try.
@tonydenion3557
@tonydenion3557 Жыл бұрын
AutoGPT on steroids ? :D
@avidrucker
@avidrucker Жыл бұрын
I'd love to see a side by side comparison across a range of tasks
@GuinessOriginal
@GuinessOriginal Жыл бұрын
You still change temperature and top_p settings at the model level, right? Or can you do it at the chat/query/function level?
@SeanKula
@SeanKula Жыл бұрын
I'm excited to have this implemented into a humanoid robot. Function call it to do chores. It would be really cool if it can write its own custom functions based off what you asked
@goodtothinkwith
@goodtothinkwith Жыл бұрын
I was puzzled… and then my eyes got wide when I realized what this really was. Deterministic structure enables it to be used as a piece in a larger thing… you could put a thousand of these together, building a “program” full of these “functions”… utterly brilliant move by OpenAI
@Artorias920
@Artorias920 Жыл бұрын
this is actually perfect for something Im working on :D
@dannyzilberg3101
@dannyzilberg3101 11 ай бұрын
very interesting, thank you!
@ylazerson
@ylazerson Жыл бұрын
thanks! this is out of this world!
@liog4127
@liog4127 11 ай бұрын
Great Intro. TNX!
@MuhammadUsman-ix6jo
@MuhammadUsman-ix6jo 11 ай бұрын
This is amazing, I am using this to parse data 🙂 and its working very well
@JT-sv9bi
@JT-sv9bi Жыл бұрын
Interesting. I was already doing this by including a "menu" of functions in the initial prompt and then 1st ask which of these functions would be applicable given the actual prompt context. Then with that answer, I'd run the function and create a new prompt with the initial prompt + the result of that specific function. This is now a more official, structured way of doing it. Given the limited amount of functions you can pass it probably still makes sense to work with a tree structure of sets of functions which you pass in a second prompt, after you've asked which set is most applicable first.
@lydianlights
@lydianlights Жыл бұрын
whoa this is awesome, especially that it works with gpt 3.5
@homerdus9668
@homerdus9668 Жыл бұрын
Thanks for sharing, just might be simpler to show this example as a chart
@appaloosa_
@appaloosa_ 11 ай бұрын
great video, thanks for explaining this! Project Idea - Automated Trading/Stock Advisor bot: Scrape a financial news page, send article to GPT to determine if the stock should be sold or bought, then output the stock symbol & trade (buy, sell, nothing) with functions. Maybe GPT could check your positions & portfolio first before making the final decision...
@alimohammad2541
@alimohammad2541 Жыл бұрын
I was trying to make it consistent forever, this is way better and the capability is huge, I wonder how far it can goes.
@StephenRoseDuo
@StephenRoseDuo Жыл бұрын
This is indeed absolutely insane
@RipYaZa
@RipYaZa Жыл бұрын
Thanks for covering this topic! How are temperatures handled in the varied_personality functions? Could it be possible to include a temperature in the functions? Or to let GPT think about 'the right temperature' for generating the response? How do you see this? Will this be the 'prompt engineering part' people need to finetune themselves? Or will GPT do that for us?
@dr.benway1892
@dr.benway1892 Жыл бұрын
This feels like a new programming paradigm. Had to order an API key just to test this. It's a bit frustrating to know there's loads of possibilities with this but you have to figure out those possibilities. New territories to be found.
@JChen7
@JChen7 Жыл бұрын
I'm feeling the same way. As a programmer, I admittedly get some comfort in the deterministic nature of programming in the classical sense. This new stuff feels like trying to sculpt desired behavior out of squishy clay to me. Will definitely take some time to wrap my head around it, hopefully before it takes my job (:
@TheHavyxon
@TheHavyxon 11 ай бұрын
To populate "content" for example for some confirmation or other message - it could work simply to put it to the function call output. For example: "message" : "{"type":"string", "description":"Reply with confirmation that the function get_current_weather was called."} Should work - I used it in the old "form" way of using chatgpt to get custom confirmation replies or questions for required fields. In the end, all this function calling is then achievable also in gpt-3.5 with high success rate with a good prompt, but this is really nice structure. :) Also very good practice would be to use function calling for intent recognition and then pass the input to identified function to save tokens for the parameter blocks for individual functions. :)
@Bandude231
@Bandude231 Жыл бұрын
This will be nuts
@davidbeesley5076
@davidbeesley5076 Жыл бұрын
I think your function should be called “set_commands” or “run_commands” instead of “get_commands” as the commands as provided as a parameter. “get_commands” sounds like a getter function so you would expect to be returned the commands instead of providing them. I think this might be why the “auto” version of get_commands didn’t work.
@Jamman88888
@Jamman88888 Жыл бұрын
6:10 "do cool shhhh...stuff." nice save haha. Good video, i wonder if a lack of functions like this is why the snapchat AI used to gaslight people? It would tell them it didn’t know their location for privacy reasons, then in the same sentence tell them where the closest macdonalds was, or the weather in their area. Also, any chance on a new gantheftauto video? Its been 2 years, and its my all time favourite of yours :p
@isMatvei
@isMatvei 9 ай бұрын
Very cool shishtuff. 😮
@code-grammardude5974
@code-grammardude5974 Жыл бұрын
this is awesome. text-davinci was the only model I could get good performance out of (without access to gpt4) so this is really exciting since gpt3.5-turbo is so much cheapter. There also might be some token saving compared to typical zero shot learning (in some cases)
@orangehatmusic225
@orangehatmusic225 11 ай бұрын
Yeah they don't give pleebs access to GPT-4. Only those them deem worthy.
@ThePacifistanarchist
@ThePacifistanarchist 11 ай бұрын
Damn this will be so useful. I'm no programmer, I've actually decided to work with chat gpt to help me create some apps that I wished existed and kinda leaning along the way. Bit I've been in IT for years so I get how things should operate but coding syntaxes is something else entirely. My idea while using chatgpt with its access to web search and noteables via plugins, was to create a series of routines and shorthand. So instead of spending all my time working and reworking my prompts I could create a series of routines and subroutines that would tell it exactly how I wanted it to behave. I use various tagging techniques and had it form an index to refer to. So for a bit I could say something in a prompt like: [rt:1] and based on the documents in Noteables it would go find that routine and then follow it. The problem is these tags mean less and less as the conversation goes on because from my understanding the weight of the initial context means less and less. Still fun tho
@karlosfy
@karlosfy Жыл бұрын
Awesome video! Just wondering about the "get_commands" example, I don't know if I understood correctly but I think the function should be "execute_commands", and the argument is a list of commands to be executed, so GPT gives you the commands to be execute, right? Anyway, great content :)
@davidbeesley5076
@davidbeesley5076 Жыл бұрын
100%. This is why I think the “auto” example didn’t work. The function is named backwards.
@chrisbarber7291
@chrisbarber7291 11 ай бұрын
You can loop the GPT call as well so that GPT can call multiple functions one by one if it wants, before responding to the user.
@nootajay
@nootajay Жыл бұрын
Bro scaled up from tones to dozens real quick
@WT83
@WT83 Жыл бұрын
I wanted to make a table in chat gpt and have it populate it with items that make sense. I wanted to do some manipulation of the table so I told gpt to pretend it was database software and the table was a table was in the database. I could make up functions on the fly and they all worked as long as I told it what the function was supposed to do. This feels like an official version of that.
@WandafoolAI
@WandafoolAI 11 ай бұрын
Hi... i really wnjoyed this video even thou i sidnt understand much, but ayilk sone and really enjoyed OP's enthusiasm... So , hmmm, kind of awkward but here i am , 44 years old, travelled all my life around the world, didnt get any college defeee, just finiahed highschool at 18 and have been travelling since, qnd loving life .. but rn , after 25 on the road z ive decided to go back live closer to my family, in belgiumz and im gling throuhh what i thinkis my middle life xrisis 😅, and im fascinated with all the AI tools andntechnology, and kind of want to sice deep into it, and hope i could turn my life around and actually fet a good ceeative job in the future, uaing these tools, or programming them / engeneering prompts etc... Im just not aure where to start really , neither where k want to get to with it.. i really loce art aongraohic design/ video/ music is really attractive to me (i have 29!years of autodidact experience in electronic music production) but maybe programing will be better as far as fiture job ? I can see myself atudy that too ... Okz the queation for whoever is atill readuing : where should i start ? What advice woukd you give me? .. i feel likenwith ai techs and tools i ahouldnt lose time ayatting from zero, that things are sifferent nownthan when you all started , maybe? ... I hear outhon, i hear JSON, i hear open source, qnd many of these termsz but honestly I don't even have a great laptop at this point, thats why i didnt even started mingling with open source (except for aome that are usable withoit API , or i donno ...hmm . WEBUI? ..aee, i know terms but im not sure what they are 😅 Thats it. Please, any info or advice to guide me ? Id appreciate it dearly
@robhess3878
@robhess3878 Жыл бұрын
For the second function call about the dehumidifier, would you not get a similar answer just from using that info in a prompt? And you are saying, with the call function, that this is basically the inner workings of how chat GPT reads prompts? So it makes sense to accurately write your prompts as if you are writing a call function? Except that inputting the call function itself is more accurate? Im wondering if this can be used to make GPT less forgetful in tree of thought conversations through multiple prompts, or not lose track of context as easily
@serta5727
@serta5727 Жыл бұрын
Wow that’s impressive
@techfren
@techfren 11 ай бұрын
00:00:01 - Exhibition of OpenAI Function Calling Capability 00:02:34 - Programming - Creating Functions for Weather Data Extraction from GPT-4 00:05:05 - Describing and setting parameters for a 'get current weather' function. 00:07:44 - User describes calling function with JSON object & options for running function. 00:10:06 - Converting JSON object to dict for term GPT with GPT 3.5 00:12:41 - Stream discusses extracting structured user data & terminal commands for a GPU-tensorflow install. 00:15:12 - GPT4: Describing a function and its parameters for a structured response 00:17:39 - Injects varied personality responses into AI functions to generate personalized responses to user queries. 00:20:14 - Introducing sassy and sarcastic response structure from GPT4 models created with timestampgenius.com
@AbdullahOllivierreIT
@AbdullahOllivierreIT 11 ай бұрын
Any way you could also provide an AI summary of the video and provide the tool used for that ? I'm sure this must be a fairly easy task to do given the video is north of 20 minutes
@techfren
@techfren 11 ай бұрын
@@AbdullahOllivierreIT yeah definitely
@maxernststockburger9420
@maxernststockburger9420 11 ай бұрын
Nice! Gonna try that as soon as possible. The functions I define will be added to the tokens that i use? So in theory, the number of functions I pass in is limited by the context window or?
@christian15213
@christian15213 11 ай бұрын
Great Video
@StefVonB
@StefVonB Жыл бұрын
Cool shtuff!
@diego-castro
@diego-castro 11 ай бұрын
I liked very much! and I only managed to learn like you teaching! Could you demonstrate how it would be to create a food recipe, adding title, ingredients, preparation method? I think it would be amazing example
@Tarbard
@Tarbard Жыл бұрын
I wonder if they use microsoft's guidance library for the structured data, it feels like it (along with appropriate prompting). I was looking at using Guidance to create more accurate JSON responses from LLMs, this will do it for me though.
@stpaquet
@stpaquet Жыл бұрын
Thanks for sharing. Do you know if there is a way to format empty response. One issue of Gen AI is to say I don't know ;-) But with some patience and proper prompts you can get to the point where you have an empty response. I noticed that it was then pretty hard to get a consistent formatting of the response and that quite often GPT 3 and 4 where returning a string that was not matching the requested format.
@ILikeAI1
@ILikeAI1 Жыл бұрын
You have a much better time using auto if you use the system prompt to tell it that it prefers to use commands over dialogue whenever possible.
@GuinessOriginal
@GuinessOriginal Жыл бұрын
What system prompt is that?
@tiffanitaylor8373
@tiffanitaylor8373 Жыл бұрын
The one that goes at the top of your array/list of message objects. It's the only system prompt 😅 I know of anyway. Did you read the docs?
@ander300
@ander300 9 ай бұрын
Part 10 of Neural Net from Scratch, about analytical derivatives??? Please bring the series back!
@IceMetalPunk
@IceMetalPunk Жыл бұрын
Interesting. So it seems like this is more or less just the ChatGPT plugins approach, but exposed in their developer API and with a model fine-tuned to handle it better. I say "just" but it's pretty cool! ...I kind of wonder if this could be used with a vector database like Pinecone to implement the Generative Agents paper's memory stream architecture more easily?
@technolus5742
@technolus5742 Жыл бұрын
I suppose there is a hacky way to still get the content. Just define the function call to contain a content parameter of type string and instruct gpt to populate it with the content you desire.
@kelvinprimo
@kelvinprimo Жыл бұрын
Did this not already exist before even ChatGPT in applications like Google Dialogflow, where there were intents and entities?
@jhadesdev9576
@jhadesdev9576 Жыл бұрын
and can an argument of the function by an array, something like a list of 5 suggestions for a blog post title? I couldn't find the syntax to define an input argument of the function as a list. Thank you for sharing, awesome content.
@hadtomakeachannel
@hadtomakeachannel 11 ай бұрын
Holy shit this is amazing! 😮
@aaronmineen5511
@aaronmineen5511 Жыл бұрын
4:27 "note this is plural"... Me: "note this is an array" 😂 awesome video
@memespdf
@memespdf Жыл бұрын
The functions data passed to GPT looks like a JSON-ified version of OpenAPI 3.0 spec. Is there any information about if this is intended? Maybe OpenAI used public OpenAPI specs for training?
@thefruit
@thefruit Жыл бұрын
Couldn't you make a call that makes it number the messages as a reference? You could then make ChatGPT act as basically every profession in the world and use it for educational purposes.For example you could build a library with cases on how it should reply to a student/client in different scenarios and then build a session summary to continue next time and so on.... So many possibilities now!
@mattkim96
@mattkim96 11 ай бұрын
My example variation of ChatGPT as an assistant was also a sassy and sarcastic assistant. I wondered why we would do that to ourselves haha
@jaschachtner
@jaschachtner Жыл бұрын
Hi everyone! And thanks to sentdex for the video. I have a beginner's question. Is there a way to save the model and its functions in OpenAI without having to set it up for every new prompt or instance I want to run?
@vinicius6385
@vinicius6385 11 ай бұрын
Wait until fine-tuning for gpt4, it's going to be amazing
@davidvera4575
@davidvera4575 Жыл бұрын
amazing!
@TheMullela
@TheMullela Жыл бұрын
Wow. This is perfect for me. I always understood how to describe it, but hard coding just isn’t my thing. With this I just can describe what ever I would like to have AND get a result.
@mytechnotalent
@mytechnotalent Жыл бұрын
Harrison this is crazy. I really wish you would create a GPT from scratch series. I know you had a 2 years ago GPT series but what do you think? I am also helping new students with your book. They are buying the ebook.
@sentdex
@sentdex Жыл бұрын
I may do something like this at some point, gotta finish NNFS videos first though. Karpathy did a sort of GPT from scratch series if memory serves during his transition from Tesla to OpenAI. Have you seen that one?
@mytechnotalent
@mytechnotalent Жыл бұрын
@@sentdex yea its pretty amazing but moves quick. I like how you really take your time to break it down and make it digestible Harrison it is what really defines you.
@jwadaow
@jwadaow Жыл бұрын
@@mytechnotalent Also it uses tiny-Shakespeare and tokenizes differently to Tiktokens. It is educational for certain aspects of the Google paper that spawned transformers. There is room to expand on it further.
@ariramkilowan8051
@ariramkilowan8051 Жыл бұрын
Using this functionality to do cool shhi.... stuff. 😅. Nice Catch
@Blight-fp3vt
@Blight-fp3vt Жыл бұрын
amazing.
@albertgao7256
@albertgao7256 11 ай бұрын
Thanks for the video, I am a bit confused about why use this function, for example, in that get_weather() function, all the GPT does it to extract the information to a parameter that we can feed into a function, so why not we just write a prompt to get the location as a json directly? is it because you do not know what the user would ask? so you can provide a list of functions that you wrote, and from the output, we can determine, whether the user invokes one of our functions or not, if yes, then we use the GPT output to do a further processing? but this is actually complex, after getting the result from the your own function, how do you know how to construct the proper answer to the user? what about the user triggers 3 functions, and what should happen next? how could you provide an outcome to the user in this case (more than 1 function has been invoked)?
@GeorgePolzer
@GeorgePolzer 11 ай бұрын
good questions! Have you figure out the answers? Please share.
@shreygupta7877
@shreygupta7877 Жыл бұрын
0613 refers to the date this version was launched. In this case, 13 June.
@jainicz
@jainicz Жыл бұрын
Thanks for your video! I wonder how is this different from, say, a weather plugin? Doesn't a plugin do the same thing by calling some "functions" that were written by human developers?
@sentdex
@sentdex Жыл бұрын
my guess is almost all plugins were created up to this point using forms/preprompts and theyll all be soon re-written to use function calling. For an end-user (or middle user?) using some plugin...you probably wont notice any difference.
@mpfmax0
@mpfmax0 11 ай бұрын
I have been using the chat completion api to get gpt-3.5-turbo to output JSON strings with the aspect, sentiment and text segment of product reviews, which I then use to build dataframes and make aspect based sentiment analysis plots and stats. I just send it 5 examples of user/assistant answer/response as a prompt. I wonder if using this would make the outputs more reliable/accurate? I want to understand what is the best way to conduct aspect based sentiment analysis using GPT models with openai api
@GuidoSalimbeni
@GuidoSalimbeni 7 ай бұрын
Great video. How can force to run all the function call when there are more than one? I cannot find documentation . You used ('name': 'the function name} ... but how to ask to force run 2 functions?
@ghosthermes
@ghosthermes Жыл бұрын
4:37 wait for the engineer to make a marvel reference challenge
@ness3963
@ness3963 11 ай бұрын
This would be really great if you could force it to use any function, not just one. Part of why this is useful is the fact that its able to determine which function to call. If I have to figure that out ahead of time that almost defeats the point
@Benepstein97
@Benepstein97 Жыл бұрын
Re 9:50 I'd imagine (but haven't yet tried) that if you want to also get a message, you can simply add another "parameter" to the function called "message" or "content" and describe it as such. You could even make it required
@hadtomakeachannel
@hadtomakeachannel 11 ай бұрын
This is what I have been thinking…
@codestuff2553
@codestuff2553 Жыл бұрын
One very funny thing I noticed, as a result (I think) of the training they did for this, it seems GPT is now CONVINCED that it has access to a Python interpreter. For example, through the ChatGPT website (or through the completion API, I found either is affected), try asking "Are you able to run Python code?". It may respond correctly, but if you regen a couple times it will tell you at some point that it can. I noticed this bug as I was messing around trying to get function calls to work, and ChatGPT repeatedly tried to call a function called "python" with python code, even though I had no such function or anything related defined. This affects GPT 3.5, not sure about GPT 4.
@Smytjf11
@Smytjf11 Жыл бұрын
I've found that asking GPT4 about its abilities is an invitation to hallucinate hard core. Bing got weird really fast.
@blazi_0
@blazi_0 11 ай бұрын
I think this was first glimpse of code interpreter. Now it's officially open for everyone and chatgpti can run its own python code and test it
Python CUDA Installation & CUPY | GPU Acceleration Basics 01
16:58
Rounak Paul
Рет қаралды 3,7 М.
Универ. 13 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:07:11
Комедии 2023
Рет қаралды 4,3 МЛН
The day of the sea 🌊 🤣❤️ #demariki
00:22
Demariki
Рет қаралды 40 МЛН
Why You Should Always Help Others ❤️
00:40
Alan Chikin Chow
Рет қаралды 109 МЛН
Mensagem de bom dia sexta feira.
1:01
Mensagens diárias
Рет қаралды 4,8 М.
GPT function calling in a nutshell
15:36
Henrik Kniberg
Рет қаралды 36 М.
GPT Engineer: Things Are Starting to Get Weird
10:14
ArjanCodes
Рет қаралды 841 М.
Building an Open Assistant API
41:11
sentdex
Рет қаралды 30 М.
ChatGPT Functions - Full Tutorial for using OpenAI Functions
29:14
Adrian Twarog
Рет қаралды 85 М.
OpenAI Tutorial - Decoding Function Calling
28:24
Dave Ebbelaar
Рет қаралды 64 М.
Prompt Engineering Tutorial - Master ChatGPT and LLM Responses
41:36
freeCodeCamp.org
Рет қаралды 1,3 МЛН
Function Calling in Ollama vs OpenAI
8:49
Matt Williams
Рет қаралды 26 М.
I wish every AI Engineer could watch this.
33:49
1littlecoder
Рет қаралды 48 М.