Langchain OpenAI Assistants API For Beginners ๐ฆ๏ธ๐ Function Calling made EASY! ๐คฏ (Full Tutorial)
Key Takeaways
This video demonstrates how to integrate Langchain with the OpenAI Assistants API to create a simplified and powerful AI assistant, using function calling to combine multiple steps into one assistance API.
Full Transcript
this is amazing what if we can integrate Lang chain with your open AI assistance API to create assistance API we have four different steps but what if we can combine all together into one assistance API with the Lang chain and making it simplified that's exactly what we're going to see today let's get [Music] started hi everyone I'm really excited to show you about Lang chain with assistance AP I'm going to take you through step by step on how to do this but before that I regularly create videos in regards to artificial intelligence in my YouTube channel so do subscribe and stay tuned in Lang chain there are functions which simplifies our work of creating an assistant rather than creating an assistant then a thread then a message and then running it you can do all these things in one function to code that first make sure you install L chain and open AI in your virtual environment and click enter next export your open a API key like this and click enter now in your file from Lang chain. agents. open Assistant import open AI assistant runnable this is the function which can make our work easy now using that open AI assistant runnable I'm going to create an assistant name Lang chain instruction you are a personal math tutor and the tools we are using it code interpreter model is gp4 Turbo next output equals assistant. invoke there you ask your question content what's 10 - 4 raised to the 2.7 now we going to print the output by looping through the output now we're going to run this code in your terminal python assistance Lang chain. Pi that's where my code is and click enter now you got the answer here the result is approximately minus 32.2 Lang chain did all the hard work for us and gave us the answer in an easy way much more than that what if we can add our function calling ability here now we we're going to add function calling to this in your terminal pip install duck ducko hyphen search and click enter this duck. go search package will help us to search the internet so we're going to add browsing the internet facility using custom function calling in our assistant so first from Lang chain tools import Duck Duck Go search Run next we are defining the list of tools that is dugdug go search run then we are passing this tool to this list and we are mentioning that as agent equals true this does all the magic the agent feature in the assistant will be capable of handling all the requires action status if you see the original steps for adding a function calling ability you need to have all these five steps but the agent feature will solve that issue now instead of invoking we are importing from L chain agents import agent executor then agent executor equals agent executor and you're passing assistant as the agent and the list of tools next output equals agent executor do invoke previously we did assistant. invoke here we are doing agent executed. invoke and you are asking a question what's the weather in London today divided by 2.7 finally we are printing out the results now I'm going to run this code python assistance Lang chain. and click enter all the five steps will be happening behind the scenes now we got the answer here's the content what's the weather in London today divided by 2.7 the output the current weather in London is 6ยฐ and if it's for Celsius this is the output and if it's for fenit this is the output as simple as that you integrated all the five steps in literally two bits of code one you're creating assistant with as agent and then you're using agent executor as simple as that I'm going to create more videos in regards to this so stay tuned I hope you like this video do like share and subscribe and thanks for watching
Original Description
๐ Hey AI Enthusiasts! In this video, I dive into the amazing world of integrating Lang Chain with the OpenAI Assistants API to create an incredibly simplified and powerful AI assistant.
ChatGPT Tutorials Playlist: https://www.youtube.com/playlist?list=PLYQsp-tXX9w62Lgpvx2JMBvKAAi7rfb_t
GPT-4 Assistants API + Python: https://www.youtube.com/watch?v=pZUDEQs89zc
GPT-4 Assistants API +Node: https://www.youtube.com/watch?v=CPlwcY5mQ_4
ChatGPT Beginners Guide: https://www.youtube.com/watch?v=_E9rqrnPzWI
GPT-4 Turbo: https://www.youtube.com/watch?v=Fo0KEPP7Nt4
GPT-4 Seed: https://www.youtube.com/watch?v=q5o8n1_jQb4
GPT-4 JSON: https://www.youtube.com/watch?v=9FZSA2UzXL0
ChatGPT Text to Speech API: https://www.youtube.com/watch?v=LWfE-j_V2J0
Dall-e 3 API: https://www.youtube.com/watch?v=eKCLFY5_NZI
Whisper API: https://www.youtube.com/watch?v=B9AuQ3jpwrA
GPT-4 Vision API Image: https://www.youtube.com/watch?v=xtdQb7-bv7E
GPT-4 Vision API Video: https://www.youtube.com/watch?v=QyqnR3bBMDs
Code: https://mer.vin/2023/11/langchain-assistants-api/
Here's what you'll learn:
Integrating Lang Chain with OpenAI API: Discover how to combine multiple steps into a seamless process.
Easy Setup: Learn to install necessary tools and export your API key.
Creating AI Assistants Simplified: I'll show you how to use OpenAIAssistantRunnable for efficient assistant creation.
Practical Examples: Witness the assistant in action with real-world queries.
Advanced Features: Adding internet browsing abilities and simplifying complex tasks into a few lines of code.
Stay tuned for more AI magic and remember to like, share, and subscribe for the latest in AI innovation! ๐ป๐
0:00 - Introduction to Lang Chain and OpenAI API Integration
0:24 - Getting Started with Lang Chain and OpenAI Assistant
0:54 - Installing Lang Chain and OpenAI in Virtual Environment
1:07 - Creating an AI Assistant with OpenAIAssistantRunnable
1:31 - Example: Math Tutor Assistant
2:02 - Adding Function Calling: DuckDuckGo
Watch on YouTube โ
(saves to browser)
Sign in to unlock AI tutor explanation ยท โก30
Playlist
Uploads from Mervin Praison ยท Mervin Praison ยท 0 of 60
โ Previous
Next โ
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Build GCP Infra using Pulumi in YAML format
Mervin Praison
How to Convert a Pulumi YAML File to Python Format
Mervin Praison
Speed Up AWS EKS: A Complete Guide to Performance Tuning & Debugging!
Mervin Praison
Learn GCP GKE to AWS EKS Migration in Just 5 Minutes: Quick Guide
Mervin Praison
AWS & Kubernetes: The Definitive Guide to Data Persistence with PV and PVC
Mervin Praison
ChatGPT Voice Conversation RELEASED! It's AMAZING!! (Demo)
Mervin Praison
How to Install Mistral 7B in Minutes: Quick & Easy Guide! โ
Mervin Praison
Code Llama Install Locally: ๐๐ป Elevate Your Python Skills!
Mervin Praison
Orca Mini: Your Ultimate Guide to Install and Test on Mac & Linux ๐ป
Mervin Praison
Quick & Easy Vicuna Setup on Mac and Linux ๐ป
Mervin Praison
Quick Guide: Llama2 Local Installation and ChatGPT with pip! Python๐ ๏ธ
Mervin Praison
Query PDFs Like a Pro with Local GPT: Full Setup Guide! ๐
Mervin Praison
LM Studio: EASIEST way to Run Large Language Models Locally!
Mervin Praison
AMAZING ChatGPT Vision is OUT! ๐คฏ 14+ Examples (Step-by-Step) FULL Tutorial
Mervin Praison
Unbelievable! Build ANY App Instantly with Smol AI! ๐ฒ๐ฅ
Mervin Praison
Amazing! AutoGen Made Easy: A Step-by-Step Beginners Guide ๐
Mervin Praison
How to Set Up LoLLMS and Run LLMs Locally! ๐ Step-by-Step Tutorial
Mervin Praison
GPT4All: INSANE Way to Run Large Language Models Locally! ๐ฒ Step-By-Step Tutorial
Mervin Praison
Incredible AI-Powered NPCs in Unity Game Engine: Step by Step Tutorial!๐คฏ
Mervin Praison
MemGPT ๐ง LLM as Operating System. It's INSANE! Step-by-Step Tutorial ๐คฏ
Mervin Praison
Text Generation Web UI: MIND-BLOWING Way to Run LLM Locally! ๐คฏ
Mervin Praison
Unlock the INSANE Power of OpenAI GPT-4 with C#/.NET! ๐ฒ
Mervin Praison
Integrate Langchain and Ollama for Local AI Power ๐คฏ Indeed POWERFUL!
Mervin Praison
ChatDev: INSANE Virtual AI Agents! Future of Software Development ๐ฒ
Mervin Praison
Query PDFs Using Mistral: Unlock INSANE Power! ๐คฏ
Mervin Praison
AutoGen + Open-Source LLMs: UNBELIEVABLE! Step-by-Step Tutorial You Can't Miss! ๐คฏ
Mervin Praison
AutoGen + Text Generation WebUI: Unbelievable 100% Local Private Setup ๐คฏ
Mervin Praison
MemGPT: Amazing! External Context for LLM #ai #llm #memgpt #generativeai #mem #gpt #openai #chatgpt
Mervin Praison
GeniA: Kubernetes + AI for MIND-BLOWING Operational Efficiency! ๐คฏ FULL Tutorial
Mervin Praison
VertexAI Meets LangChain for Mind-Blowing AI Conversations! ๐ฒ Step by Step Tutorial
Mervin Praison
Simplified ChatGPT API Setup on Node.js for Newbies! ๐ Step by Step Tutorial
Mervin Praison
Autogen: Ollama integration ๐คฏ Step by Step Tutorial. Mind-blowing!
Mervin Praison
LiteLLM: One-Function Call to ANY Large Language Model! ๐คฏ UNBELIEVABLE!
Mervin Praison
ChatGPT Chatbot in Less Time Than You Think! ๐๐ Step-by-Step Tutorial
Mervin Praison
LiteLLM Chatbot: Build Your Own in MINUTES! INSANE! ๐ค๐ฅ
Mervin Praison
Create Chatbot: Turn ANY Open-Source LLM into a Conversation Pro! ๐ค
Mervin Praison
Create Chatbot: Ollama Integration Made UNBELIEVABLY Easy! ๐
Mervin Praison
LlamaIndex + ChatGPT: Ingest Data and Experience UNBELIEVABLE Query Results! ๐
Mervin Praison
INSANE! OpenAgents: Automated Data Analysis with Kaggle ๐คฏ
Mervin Praison
React.js LLM Agent for Next-Gen Coding using ChatGPT ๐ Mind-Blowing ๐คฏ
Mervin Praison
MemGPT + Any LLM ๐ 100% Local & Private Integration Unveiled! Unlimited Memory
Mervin Praison
MemGPT + AutoGen ๐ง ๐ค Unlimited Memory & Autonomous AI Agents! INSANE๐คฏ
Mervin Praison
AutoGen + Google's Palm LLM & More! Revolutionary AI Integration ๐
Mervin Praison
MemGPT & LM Studio Integration Revealed! ๐ฅ Next-Level AI
Mervin Praison
๐ AutoLLM: Unlock the Power of 100+ Language Models! Step-by-Step Tutorial
Mervin Praison
AutoLLM & Gradio Integration You Won't Believe! ๐คฏ Mind-Blowing
Mervin Praison
AutoLLM & FastAPI Tutorial: Query 100+ Language Models! ๐ฑ
Mervin Praison
Quivr: LLM's Second Brain - Transforming Data Management & Advanced Query with AI! ๐คฏ
Mervin Praison
AutoGen & MemGPT with Local LLM: A Complete Setup Tutorial! ๐ง AMAZING ๐คฏ
Mervin Praison
LocalAI: Free, Open Source OpenAI Alternative ๐ INSANE ๐คฏ Step-by-Step Tutorial
Mervin Praison
Yarn Mistral 7B 128k LARGE context window, Small size ๐คฏ INSANE ๐ Setup Tutorial!
Mervin Praison
Zephyr-7B: The Small and Mighty LLM ๐คฏ Step by Step Tutorial! ๐
Mervin Praison
Promptfoo: How to Test Your LLM ? ๐ VERY EASY!
Mervin Praison
Pydantic: How to Validate LLM Responses? ๐ Quality Response. VERY EASY!!!!
Mervin Praison
Pydantic: FORCE Your AI to Respond Back in UPPERCASE! ๐คฏ Step-by-Step Tutorial ๐ฅ
Mervin Praison
Pydantic: How to use LLM to convert unstructured data to structured data?
Mervin Praison
AutoGen Function Calling: INSANE ๐ Custom Integrations! Step-by-Step Tutorial ๐คฏ
Mervin Praison
OpenAI Assistants API + Python ๐ค How to get started? (FULL Tutorial) ๐คฏ INSANE
Mervin Praison
GPT-4 Vision API ๐คฏ INSANE Video Recognition Powers! Step-by-Step Tutorial ๐
Mervin Praison
GPT-4 Vision API ๐ The Future of Image Recognition! ๐คฏ Step-by-Step Tutorial
Mervin Praison
More on: LLM Foundations
View skill โRelated Reads
๐ฐ
๐ฐ
๐ฐ
๐ฐ
The Machine Accent Travels: AI Text Is Rhythmically Monotone in 70/70 Cells Across 3 Languages
Dev.to AI
SynapseAI: What Happened When I Stopped Trusting Just One LLM
Medium ยท LLM
Claude make Fable 5 permanent
Simon Willison's Blog
Changes to LLM pricing: Novita and StreamLake
Dev.to AI
Chapters (6)
Introduction to Lang Chain and OpenAI API Integration
0:24
Getting Started with Lang Chain and OpenAI Assistant
0:54
Installing Lang Chain and OpenAI in Virtual Environment
1:07
Creating an AI Assistant with OpenAIAssistantRunnable
1:31
Example: Math Tutor Assistant
2:02
Adding Function Calling: DuckDuckGo
๐
Tutor Explanation
DeepCamp AI