OpenAI API Function Calling - Hands-on Tutorial for AI Developers!
HTML-код
- Опубликовано: 9 фев 2025
- Have you struggled getting a json output from OpenAI API?
Are you always trying to call an external API from GPT-4 API responses?
If you are an AI Developer, Function Calling to your rescue!
OpenAI API Function Calling - openai.com/blo...
Colab - colab.research...
ChatGPT API Tutorial - • How to use ChatGPT API...
❤️ If you want to support the channel ❤️
Support here:
Patreon - / 1littlecoder
Ko-Fi - ko-fi.com/1lit...
Your delivery & content are really amazing... Great work!!
Glad you like them! Let me know after you watch the video if there's anything I could improve.
He's back! 🤩 and I was just working on function calls too!
Oh wow! Any specific use case? Thanks for the wishes
@@1littlecoder a very interesting spin on an agents framework
Indeed.
This video is the first video link on google when searching "openai function calling"
great work bro. you are the first indian youtuber to make videos on new ai updates ❤
Thanks bro. Means a lot!
It’s using Celsius because you told it to default to what is used in *your* location - not the location you’re asking about.
could be a dumb question, but why are we not seeing an actual temperature value in the response? is it possible to get that also?
you are the best my bro
Can you tell me how can i make chatbot for sending email i am bit confused
Interestingly, the assistant seems to just use the function output almost "as is". I'm unable to get the assistant to use the function output as context only and focus on the users actual question...
Example: my function returns all the information about a property, and the assistant seems to just output the whole block of information instead of using it as a context/knowledge base to answer the users question. Nothing I put in the system message affects how the assistant uses the information from the function call.
Any idea how this could be achieved?
It could be that its inferring your location rather than the location in input. Try tweaking the description in the function for that parameter. Description plays important role in functions
Thanks, Did it give you a different result?
It’s very…. Functional 😂
Hehe :)
The example in the video has very interesting functionality.:)
Can you discuss how to do this from scratch without the python library? What are the API calls?
What is the alternative thing available in langchain
Langchain Tools
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.
Can you please do the same but without open ai api and the output should also be in natural language..
Can you elaborate
Thanks for the informative video. I want to build a chatbot for my mobile application that helps users in health management. The purpose would be simply to help users with app navigation and education. I don't have any data and all tables are there in phpMyadmin. I want to use these tools like langchain, openAI and LLM's to develop my chatbot. Any help and guidance would be much appreciated.
Regards
Sid
@Perfect Video
Thanks!
They need to change the cost for tokens within Functions, they did make it cheaper for the 4k version but reading code can be a lot of tokens.
Thank you
You're welcome
Chat response 404 coming hence not able to move forward??
From the API response?
Great demo as always. Feels like OpenAI's name "Chat GPT Functions" is a little misleading. But I am not sure I can come up with a name 😂.But very cool functionality.
Good point! Thanks for sharing. ChatGPT popularity maybe :)
Not working
All these months later and I still cant get gpt4 api. I think openai knows I secretly hate them.
This code works without GPT-4. Generally They're soon going to remove the waitlist.
Funny, totally unrelated story: I was waiting as well, but missed the e-mail (mid of March) where I got the access 2 days after requesting it via waitlist... *face-palm*
Only found out YESTERDAY, because I used a Colab where GPT-4 was pre-configured for API calls and it "magically" worked, that's how I found out 😀
Haha that's nice. At least you found out then!
@@ilianos can you share it?