Langchain: The BEST Library For Building AI Apps In Python?
Вставка
- Опубліковано 24 чер 2024
- Learn to build LLM applications using Langchain (an AI toolkit for Python and JS).
👉 Links
🔗 Code: github.com/pixegami/basic-lan...
🔗 Langchain: www.langchain.com/
🔗 OpenAI Platform: platform.openai.com
📚 Chapters
00:00 Introduction to Langchain
00:52 Setting Up Langchain and OpenAI
02:36 Generate Predictions
03:40 Getting Structured Output
05:52 Sequential Chains
07:03 Building an AI Agent
10:32 Other Langchain Features
#pixegami #langchain
Your explanation are simple and precise, it's great that that explaining what exactly this code is doing instead of writing the code line by line .
Thank you! Glad you enjoyed it :)
Awesome explanation, thank you very much.
Thanks! I hope it was helpful.
LLM : libmagic library gave me the most pain when i was on a project.
Its like everything was failing and falling apart.
How do RAG and function calling combine?
If you have a deterministic sequence (e.g. RAG first, then use the results and call a function), then you can create a chain: python.langchain.com/docs/modules/chains/
If you need the AI to reason about which action to take next (e.g. RAG or function calling) then use an Agent, and add "RAG" and "function calling" as tools: python.langchain.com/docs/modules/agents/tools/
Why would langchain just reinvent .() chaining? Abusing the python syntax like this. Just return and take in self to enable it using classes, or use a functional pattern.
I’m disgusted, lol.
I guess you're referring to the LCEL for chaining the expressions? I don't like how it works either. It uses fewer lines/words, but it really does feel a lot less intuitive to parse than just standard function chaining.