LangChain with JavaScript 🦜️ - COMPLETE TUTORIAL - Basics to advanced concept!

  Рет қаралды 28,045

Coding Crashcourses

Coding Crashcourses

Күн бұрын

In this Video I will give you a complete Introduction to langchain from Chains, Promps, Parers, Indexes, Vector Databases, Agents, Memory. A LOT to learn here! Stay turned. This course is suited for web developers who want to interact with language models and not learn Python.
If you are more interested in Python, take a look here: • LangChain 🦜️ - COMPLET...
Repo for my Code: github.com/Coding-Crashkurse/...
Timestamps:
0:00 Course Overview
1:30 Project setup and installation
3:00 Talk to the OpenAI API without langchain
7:04 Chains and Prompts Basics
9:05 Intermediate Chains: SequentialChains
14:20 OutputParsers and ResponseSchemas
17:52 Index - Loaders, Splitters, VectorDBs, RetrievalChains
26:37 Memory - use ConversationMemory
30:06 Agents - LLms plus Tools
#langchain , #chatgpt

Пікірлер: 81
@codingcrashcourses8533
@codingcrashcourses8533 7 ай бұрын
Sign up for my complete LangChain course: www.udemy.com/course/langchain-in-action-develop-llm-powered-applications/?couponCode=557BD137E003DD93E491
@ihateorangecat
@ihateorangecat 11 ай бұрын
Love it!! Please keep on making JS-AI contents. 👍
@kelvingitaumburu925
@kelvingitaumburu925 10 ай бұрын
Quite detailed. Thank you for this
@ditakreger4851
@ditakreger4851 11 ай бұрын
Danke dir für das video. auf jeden fall hat es mir geholfen✌️🤙
@shanayshukla2145
@shanayshukla2145 8 ай бұрын
Gotta say one of the best videos on Langchain so far pls continue making this legacy content
@codingcrashcourses8533
@codingcrashcourses8533 8 ай бұрын
Thanks, since the interest is quite high, i think about it :)
@AdrianMark
@AdrianMark 8 ай бұрын
You are amazing. I'm a web dev, and I found your channel because of the first langchain tutorial. Then I find this, you have thought of everything! Truly grateful, and I'm keeping a close watch to learn from you. For your info, I would most certainly pay for a course by you on bringing an LLM app to production.
@codingcrashcourses8533
@codingcrashcourses8533 8 ай бұрын
There are already some vidoes about this in my playlist. Microservice pattern und deployment on ms azure
@AdrianMark
@AdrianMark 8 ай бұрын
@@codingcrashcourses8533 Thank you, yes, I've had time to go through the rest of the videos. Truly excellent. I have a lot of learning to do to get up to the right level, and will keep coming back for more.
@nasimreja7312
@nasimreja7312 6 ай бұрын
@@AdrianMark same here
@varaprasad10
@varaprasad10 Ай бұрын
Bro believe me, you helped me a lot with this video. The content you gave me exactly what I need to know Thank you very much.
@raphauy
@raphauy 11 ай бұрын
Awesome! Thnak you!!! You are the best!
@dishasathavara
@dishasathavara 11 ай бұрын
Well Explained!!! Thank you so much for the video
@user-ud8cx9wl8q
@user-ud8cx9wl8q 6 ай бұрын
great course thanks man
@jeremydudet
@jeremydudet 7 ай бұрын
this was helpful thank you
@rossanobr
@rossanobr 11 ай бұрын
Amazing!
@MrAdityakool
@MrAdityakool 11 ай бұрын
This guy is a blessing
@codingcrashcourses8533
@codingcrashcourses8533 11 ай бұрын
How sweet ;)
@pedroalmeida8576
@pedroalmeida8576 Ай бұрын
Este video foi incrivel, vou colocá-lo em prática agora mesmo. Muito Obrigado
@codingcrashcourses8533
@codingcrashcourses8533 Ай бұрын
Gracias ;)
@amigos786
@amigos786 11 ай бұрын
Awesome!
@sasukeuchiha-ck4hy
@sasukeuchiha-ck4hy 8 ай бұрын
Thank you for the video, it was incredibly helpful. I was wondering if you could create a video that demonstrates the integration of all these elements. It would be fantastic to see how to set up a conversation, that will be stored, that utilizes sequential chains, incorporates the Vector Database, and implements an Agent. Watching all these components work together would be truly insightful. Managing chains, especially in larger projects, is a challenge I'm trying to overcome.
@codingcrashcourses8533
@codingcrashcourses8533 8 ай бұрын
I did something quite complex in a different Video. Also doing a microservice architecture in my udemy course
@sasukeuchiha-ck4hy
@sasukeuchiha-ck4hy 7 ай бұрын
@@codingcrashcourses8533 In which video?
@hastingskondwani1066
@hastingskondwani1066 11 ай бұрын
A big fan of this channel. Please make a tutorial on how we can create a next js chatbot with vercel ai sdk and langchain.
@codingcrashcourses8533
@codingcrashcourses8533 11 ай бұрын
thank you very much. To be honest, I have to find that out on my own first. I will pick that up next weekend :)
@programmingholic
@programmingholic 11 ай бұрын
Bro , You need to create Playlist for individual Videos which you have covered, so we can bookmark
@emiremark2889
@emiremark2889 5 ай бұрын
excellent course, covers the basics to get started, i prefer the frame work in Javascript Node.js although i know the libraries are the same as the python one
@codingcrashcourses8533
@codingcrashcourses8533 5 ай бұрын
Yes, already a little bit outdated unfortunately. But thanks :)
@buksa7257
@buksa7257 7 ай бұрын
Nice and clear video. Maybee something for the future: I'd like to know more about how to create a custom tool, like creating a database connection and sending SQL as input for example. I tried using the calculato.jcs file as a template for a new custom tool but i get all kinds of errors from the library i dont understand unfortunately
@codingcrashcourses8533
@codingcrashcourses8533 7 ай бұрын
Well this is an advanced request not many might be interested in. I also have other, more project based videos on the channel. This is just an Intro to the lib
@heydibyendu
@heydibyendu 11 ай бұрын
Great teaching style. I am trying the code on typescript but having a problem with importing langchain. How can we work on typescript?
@codingcrashcourses8533
@codingcrashcourses8533 11 ай бұрын
first of all - thank you very much! Where is the error happening?
@heydibyendu
@heydibyendu 11 ай бұрын
@@codingcrashcourses8533 I have installed langchain using: npm install -S langchain However, when I import I get the following error. I have put the target in tsconfig as ES2020, too: ../../../../node_modules/langchain/dist/callbacks/handlers/tracer.d.ts:22:23 - error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. 22 protected runMap: Map; ~~~ Found 1 error in ../../../../node_modules/langchain/dist/callbacks/handlers/tracer.d.ts:22
@tiagoc9754
@tiagoc9754 9 ай бұрын
Late for the party, but the error is in your import. I suppose you're trying to "import {callbacks} from 'langchain'. But thats deprecated. You should do something like 'import {handlers} from 'langchain/callbacks' This is not a copy and paste solution, but just to express the idea that now you have to import from the individual modules instead of root 'langchain'
@nathanie1637
@nathanie1637 10 ай бұрын
Can LangChain JS work with a locally running Llama.cpp? if so, do you have any materials on getting that up and running?
@codingcrashcourses8533
@codingcrashcourses8533 10 ай бұрын
sorry, don´t have to much experience with LLama :/
@pratikpednekar5363
@pratikpednekar5363 9 ай бұрын
Hi, can someone tell me how this memory would work in case of rest api? Does it cache the data locally using the memory key?
@codingcrashcourses8533
@codingcrashcourses8533 9 ай бұрын
REST Services should be stateless, so you should handle the memory outside of that service. I recommend not using the memory class inside a REST Service. I created multiple videos on langchain in production and one makes use of redis as memory. Here is the video: kzbin.info/www/bejne/f5CXm3ikedx6ras
@arberstudio
@arberstudio 8 ай бұрын
for the agent tools chain, is it passing all that info to the LLM? cause that looks like a whole lot of tokens…
@codingcrashcourses8533
@codingcrashcourses8533 8 ай бұрын
Yes it is. Thats why i am Not the Biggest Fan of agents
@kunal930
@kunal930 11 ай бұрын
Is there any other way to perform this without using the OPENAI_API_KEY, as the data is not secured when key is used
@codingcrashcourses8533
@codingcrashcourses8533 11 ай бұрын
what do you mean? Why shouldn´t that be safe? You have to provide an API key to use OpenAI
@TonyGizer
@TonyGizer 9 ай бұрын
How can I use the data returned from my embeddings in the browser?
@codingcrashcourses8533
@codingcrashcourses8533 9 ай бұрын
kzbin.info/www/bejne/f5CXm3ikedx6ras take a Look here
@sanfenli
@sanfenli 8 ай бұрын
Sorry , how to use those JS file in HTML file ? I do ,but wrong
@codingcrashcourses8533
@codingcrashcourses8533 8 ай бұрын
I would recommend to build an express api around this
@fvckprth
@fvckprth 9 ай бұрын
Do you know how to text split a pdfs? Great content btw
@codingcrashcourses8533
@codingcrashcourses8533 9 ай бұрын
js.langchain.com/docs/modules/data_connection/document_loaders/integrations/file_loaders/pdf Step1: Use PdfLoader Step2: Use the splitter you want :)
@longsyee
@longsyee 6 ай бұрын
is a nice one but i think latest version open ai chaged witout using the new Configuration
@codingcrashcourses8533
@codingcrashcourses8533 6 ай бұрын
Yep, that was updated quite a bit :)
@Sarvesh_Ganesan
@Sarvesh_Ganesan 5 ай бұрын
Is it possible for you to make a tutorial on how to use langchain JS with Amazon Bedrock API? I don't see many tutorials on the same. If you could do that, it would be super helpful. Great video by the way!
@codingcrashcourses8533
@codingcrashcourses8533 5 ай бұрын
Currently not planned. I am pretty unfamiliar with everything from amazon
@tiagoc9754
@tiagoc9754 9 ай бұрын
Do you recommend any free to use LLM? OpenAI is no longer free and I just would like to play around langchain. Also, how safe are the LLMs to use in terms of getting our data exposed for their own ML scripts? I mean, will ChatGPT be trained by my chain calls using my private database resources?
@codingcrashcourses8533
@codingcrashcourses8533 9 ай бұрын
Llama2 is currently state of the Art for open Source models. For openai models you can opt out, but i would recommend against using it for sensitive data.
@tiagoc9754
@tiagoc9754 9 ай бұрын
@@codingcrashcourses8533 thank you very much!
@tiagoc9754
@tiagoc9754 9 ай бұрын
@@codingcrashcourses8533 wow, really appreciated the llama 2 recommendation. I'm reading some articles and it looks amazing. I'm just wondering about the model being trained using our private data as well. I'll check if I can find an optout as you mentioned OpenAI does. Thanks again!
@wordpressmagics2613
@wordpressmagics2613 11 ай бұрын
Hi. Can you please help select from LangChain objects? I need functionality from LangChain that allows me to switch a prompt (or probably a chain) if the user asks "How do I pay less tax?". If he asks this question, I need to ask him about his form of ownership, type of taxation, etc. and then use this information to select another prompt for further processing. But I use ConversationalRetrievalQAChain to work with OpenAI and Pinecone. My question is what is better to use for such a task? SequentialChain or Router or something else? Please not that I use TypeScript to write this app. Thank you!
@codingcrashcourses8533
@codingcrashcourses8533 11 ай бұрын
I have the same task (with python) and do it like this. I use a custom classfier chain that returns an object. I run normal LLMChains and add the documents from the vectorstore manually, since it gives me more control, but thats of course up to you :)
@wordpressmagics2613
@wordpressmagics2613 11 ай бұрын
@@codingcrashcourses8533 Sounds not so easy for me, especially considering JS/TS langchain isn't the same as Python version (not all of the objects are there. I couldn't find Router for example). Could you maybe shot a tutorial about this Dynamic Prompting with your custom Chain class or with some langchain object? :) I can't understand how those other chains would have the same "memory" as my default. Especially if simple chains doesn't have Vector store parameters in its initialisers.
@codingcrashcourses8533
@codingcrashcourses8533 11 ай бұрын
@@wordpressmagics2613 Yeah, Router Chain seems not to exist (yet). Well, all these chains in the end help you to create a final prompt for the LLM which you send to the API. If you understand what the API expects and what the Interfaces of the Classes do under the hood, you can choose if you want a more high level chain or not. In the end, you can also build the history yourself if you want
@wordpressmagics2613
@wordpressmagics2613 11 ай бұрын
@@codingcrashcourses8533 Can I somehow get a paid consultation from you about how can I solve my problem in JavaScript?
@PinguinPvPPlays
@PinguinPvPPlays 8 ай бұрын
Great video I need help within my project do you think you can answer me some questions?
@codingcrashcourses8533
@codingcrashcourses8533 8 ай бұрын
It depends on the Kind of questions. I can not do Personal consulting for everyone. I hope that is understandable
@kunal930
@kunal930 11 ай бұрын
⚠️👉Please make more tutorials on✨ Generative AI, or please tell me where i can learn this. 🌞🌈You are doing great work ❣️👍
@CodingDecay
@CodingDecay 4 ай бұрын
1 problem. The model `text-davinci-003` has been deprecated which basically all of them use.
@codingcrashcourses8533
@codingcrashcourses8533 4 ай бұрын
Langchain Allows you to easily switch to another model :)
@hcrrby2996
@hcrrby2996 4 ай бұрын
That is true ​@@codingcrashcourses8533 Just wanted to mention it, really nice tutorial tho
@raoulkoenigaachen
@raoulkoenigaachen Ай бұрын
const model = new OpenAI({ temperature: 0, modelName:"gpt-4" });
@jotiradityabanerjee2698
@jotiradityabanerjee2698 10 ай бұрын
Could you make a tutorial on how to make applications with rete.js
@codingcrashcourses8533
@codingcrashcourses8533 10 ай бұрын
sorry, I never heard of that before ;-)
@jotiradityabanerjee2698
@jotiradityabanerjee2698 10 ай бұрын
@@codingcrashcourses8533 could u please check??🙃
@robottinkeracademy
@robottinkeracademy 11 ай бұрын
man...do you sleep? Awesome work
@lukem121
@lukem121 11 ай бұрын
Why no typescript?
@codingcrashcourses8533
@codingcrashcourses8533 11 ай бұрын
I sticked close to the official documention
@lukem121
@lukem121 11 ай бұрын
@@codingcrashcourses8533 Ah I see! Thank you for creating this content. If you make more I will be sure to watch 😃
@codingcrashcourses8533
@codingcrashcourses8533 11 ай бұрын
@@lukem121 most of my content will be in python. Thats where I earn my money and am really good at. Js and Frontend is more of a Hobby ;).
2 ай бұрын
I don't understand why to use langchain! It make simple things became complex! And also remove all freedom the programs have because of this "chains"! But, in other hands the TOOLS are the best ones!! I just use the tools! forget about this complicated chains and rules to use things and "this must do in this way", that's not why programming was made for!
@namesare4fools
@namesare4fools 11 ай бұрын
Love it!! Please keep on making JS-AI contents. 👍
OpenAI Embeddings and Vector Databases Crash Course
18:41
Adrian Twarog
Рет қаралды 395 М.
Китайка и Пчелка 10 серия😂😆
00:19
KITAYKA
Рет қаралды 2 МЛН
1❤️#thankyou #shorts
00:21
あみか部
Рет қаралды 70 МЛН
What is LangChain?
8:08
IBM Technology
Рет қаралды 144 М.
Llama3 Full Rag - API with Ollama, LangChain and ChromaDB with Flask API and PDF upload
47:09
Китайка и Пчелка 10 серия😂😆
00:19
KITAYKA
Рет қаралды 2 МЛН