GetNotes Tools
LangChain
Tool นี้คืออะไร
LangChain เป็นเฟรมเวิร์กสำหรับสร้างแอปพลิเคชันที่ขับเคลื่อนด้วย LLM และเอเจนต์ AI ช่วยให้นักพัฒนาสามารถเชื่อมโยงส่วนประกอบที่ทำงานร่วมกันได้และผสานรวมกับบุคคลที่สาม เพื่อลดความซับซ้อนในการพัฒนาแอปพลิเคชัน AI และรองรับการเปลี่ยนแปลงของเทคโนโลยีพื้นฐานในอนาคต
ข้อมูลโปรเจกต์
ดาว
142.8K
Forks
23.8K
License
MIT
อัปเดต GitHub ล่าสุด
29 ก.ค. 2569
เพิ่มใน GetNotes
13 ก.ค. 2569
Repository
langchain-ai/langchain
แปลและเรียบเรียงโดย AI
เนื้อหาฉบับภาษาไทย
ใช้อ่านเพื่อทำความเข้าใจเบื้องต้น โปรดตรวจสอบรายละเอียดสำคัญกับเอกสารต้นฉบับด้านล่าง
LangChain เป็นเฟรมเวิร์กสำหรับสร้างเอเจนต์และแอปพลิเคชันที่ขับเคลื่อนด้วย LLM ช่วยให้คุณสามารถเชื่อมโยงส่วนประกอบที่ทำงานร่วมกันได้และการผสานรวมกับบุคคลที่สามเข้าด้วยกัน เพื่อลดความซับซ้อนในการพัฒนาแอปพลิเคชัน AI — ทั้งหมดนี้ในขณะที่ยังคงรองรับการเปลี่ยนแปลงในอนาคตเมื่อเทคโนโลยีพื้นฐานมีการพัฒนา
เพิ่งเริ่มต้นใช่ไหม? ลองดู Deep Agents — แพ็กเกจระดับสูงที่สร้างขึ้นบน LangChain สำหรับเอเจนต์ที่มีความสามารถในตัวสำหรับรูปแบบการใช้งานทั่วไป เช่น การวางแผน, subagents, การใช้งานระบบไฟล์ และอื่นๆ
เริ่มต้นใช้งานอย่างรวดเร็ว
uv add langchainfrom langchain.chat_models import init_chat_model
model = init_chat_model("openai:gpt-5.5")
result = model.invoke("Hello, world!")หากคุณกำลังมองหาการปรับแต่งขั้นสูงหรือการจัดการเอเจนต์ ลองดู LangGraph ซึ่งเป็นเฟรมเวิร์กของเราสำหรับการสร้างเวิร์กโฟลว์เอเจนต์ที่ควบคุมได้
สำหรับไลบรารี JS/TS ที่เทียบเท่ากัน ลองดู LangChain.js
สำหรับการพัฒนา, การดีบัก และการปรับใช้เอเจนต์ AI และแอปพลิเคชัน LLM โปรดดู LangSmith
ระบบนิเวศของ LangChain
แม้ว่าเฟรมเวิร์ก LangChain สามารถใช้งานได้ด้วยตัวเอง แต่ก็ยังสามารถผสานรวมกับผลิตภัณฑ์ LangChain อื่นๆ ได้อย่างราบรื่น ทำให้นักพัฒนาได้รับชุดเครื่องมือที่ครบครันเมื่อสร้างแอปพลิเคชัน LLM
- Deep Agents — สร้างเอเจนต์ที่สามารถวางแผน, ใช้ subagents และใช้ประโยชน์จากระบบไฟล์สำหรับงานที่ซับซ้อน
- LangGraph — สร้างเอเจนต์ที่สามารถจัดการงานที่ซับซ้อนได้อย่างน่าเชื่อถือด้วยเฟรมเวิร์กการจัดการเอเจนต์ระดับต่ำของเรา
- Integrations — โมเดลแชทและฝังตัว, เครื่องมือและชุดเครื่องมือ และอื่นๆ
- LangSmith — การประเมินเอเจนต์, การสังเกตการณ์ และการดีบักสำหรับแอป LLM
- LangSmith Deployment — ปรับใช้และปรับขนาดเอเจนต์ด้วยแพลตฟอร์มที่สร้างขึ้นเพื่อเวิร์กโฟลว์ที่ทำงานได้ยาวนานและมีสถานะ
ทำไมต้องใช้ LangChain?
LangChain ช่วยให้นักพัฒนาสร้างแอปพลิเคชันที่ขับเคลื่อนด้วย LLM ผ่านอินเทอร์เฟซมาตรฐานสำหรับโมเดล, การฝังตัว, vector stores และอื่นๆ
- การเสริมข้อมูลแบบเรียลไทม์ — เชื่อมต่อ LLM กับแหล่งข้อมูลที่หลากหลายและระบบภายนอก/ภายในได้อย่างง่ายดาย โดยดึงข้อมูลจากไลบรารีการผสานรวมที่กว้างขวางของ LangChain กับผู้ให้บริการโมเดล, เครื่องมือ, vector stores, retrievers และอื่นๆ
- การทำงานร่วมกันของโมเดล — สลับโมเดลเข้าและออกในขณะที่ทีมวิศวกรของคุณทดลองเพื่อค้นหาตัวเลือกที่ดีที่สุดสำหรับความต้องการของแอปพลิเคชันของคุณ เมื่อขอบเขตของอุตสาหกรรมพัฒนาขึ้น ให้ปรับตัวอย่างรวดเร็ว — นามธรรมของ LangChain ช่วยให้คุณก้าวไปข้างหน้าโดยไม่สูญเสียโมเมนตัม
- การสร้างต้นแบบอย่างรวดเร็ว — สร้างและทำซ้ำแอปพลิเคชัน LLM ได้อย่างรวดเร็วด้วยสถาปัตยกรรมแบบโมดูลาร์ที่ใช้ส่วนประกอบของ LangChain ทดสอบแนวทางและเวิร์กโฟลว์ที่แตกต่างกันโดยไม่ต้องสร้างใหม่ตั้งแต่ต้น ซึ่งช่วยเร่งวงจรการพัฒนาของคุณ
- คุณสมบัติพร้อมใช้งานสำหรับการผลิต — ปรับใช้แอปพลิเคชันที่เชื่อถือได้ด้วยการสนับสนุนในตัวสำหรับการตรวจสอบ, การประเมิน และการดีบักผ่านการผสานรวมเช่น LangSmith ปรับขนาดได้อย่างมั่นใจโดยใช้รูปแบบและแนวทางปฏิบัติที่ดีที่สุดที่ผ่านการทดสอบแล้ว
- ชุมชนและระบบนิเวศที่มีชีวิตชีวา — ใช้ประโยชน์จากระบบนิเวศที่อุดมสมบูรณ์ของการผสานรวม, เทมเพลต และส่วนประกอบที่ชุมชนมีส่วนร่วม ได้รับประโยชน์จากการปรับปรุงอย่างต่อเนื่องและติดตามข่าวสารล่าสุดเกี่ยวกับการพัฒนา AI ผ่านชุมชนโอเพนซอร์สที่กระตือรือร้น
- เลเยอร์นามธรรมที่ยืดหยุ่น — ทำงานในระดับนามธรรมที่เหมาะกับความต้องการของคุณ — ตั้งแต่ chain ระดับสูงสำหรับการเริ่มต้นอย่างรวดเร็วไปจนถึงส่วนประกอบระดับต่ำสำหรับการควบคุมที่ละเอียด LangChain เติบโตไปพร้อมกับความซับซ้อนของแอปพลิเคชันของคุณ
แหล่งข้อมูล
- Documentation — ภาพรวมแนวคิดและคู่มือ
- LangChain ecosystem overview — LangChain, LangGraph และ Deep Agents ทำงานร่วมกันอย่างไร
- API reference — ข้อมูลอ้างอิงที่สมบูรณ์สำหรับคลาส, ฟังก์ชัน และประเภทสาธารณะทั้งหมด
- Discussions — ฟอรัมชุมชนสำหรับคำถามทางเทคนิค, แนวคิด และข้อเสนอแนะ
- LangChain Academy — หลักสูตรฟรีที่ครอบคลุมเกี่ยวกับไลบรารีและผลิตภัณฑ์ของ LangChain จัดทำโดยทีมงาน LangChain
- Contributing Guide — วิธีการมีส่วนร่วมและค้นหาปัญหาเริ่มต้นที่ดี
- Code of Conduct — แนวทางและมาตรฐานของชุมชน
เอกสารโปรเจกต์
อ่านเอกสารต้นฉบับ
README วิธีติดตั้ง วิธีใช้งาน และข้อกำหนดจาก repository ต้นฉบับ
LangChain is a framework for building agents and LLM-powered applications. It helps you chain together interoperable components and third-party integrations to simplify AI application development — all while future-proofing decisions as the underlying technology evolves.
Just getting started? Check out Deep Agents — a higher-level package built on LangChain for agents that have built-in capabilites for common usage patterns such as planning, subagents, file system usage, and more.
Quickstart
uv add langchainfrom langchain.chat_models import init_chat_model
model = init_chat_model("openai:gpt-5.5")
result = model.invoke("Hello, world!")If you're looking for more advanced customization or agent orchestration, check out LangGraph, our framework for building controllable agent workflows.
For an equivalent JS/TS library, check out LangChain.js.
For developing, debugging, and deploying AI agents and LLM applications, see LangSmith.
LangChain ecosystem
While the LangChain framework can be used standalone, it also integrates seamlessly with any LangChain product, giving developers a full suite of tools when building LLM applications.
- Deep Agents — Build agents that can plan, use subagents, and leverage file systems for complex tasks
- LangGraph — Build agents that can reliably handle complex tasks with our low-level agent orchestration framework
- Integrations — Chat & embedding models, tools & toolkits, and more
- LangSmith — Agent evals, observability, and debugging for LLM apps
- LangSmith Deployment — Deploy and scale agents with a purpose-built platform for long-running, stateful workflows
Why use LangChain?
LangChain helps developers build applications powered by LLMs through a standard interface for models, embeddings, vector stores, and more.
- Real-time data augmentation — Easily connect LLMs to diverse data sources and external/internal systems, drawing from LangChain's vast library of integrations with model providers, tools, vector stores, retrievers, and more
- Model interoperability — Swap models in and out as your engineering team experiments to find the best choice for your application's needs. As the industry frontier evolves, adapt quickly — LangChain's abstractions keep you moving without losing momentum
- Rapid prototyping — Quickly build and iterate on LLM applications with LangChain's modular, component-based architecture. Test different approaches and workflows without rebuilding from scratch, accelerating your development cycle
- Production-ready features — Deploy reliable applications with built-in support for monitoring, evaluation, and debugging through integrations like LangSmith. Scale with confidence using battle-tested patterns and best practices
- Vibrant community and ecosystem — Leverage a rich ecosystem of integrations, templates, and community-contributed components. Benefit from continuous improvements and stay up-to-date with the latest AI developments through an active open-source community
- Flexible abstraction layers — Work at the level of abstraction that suits your needs — from high-level chains for quick starts to low-level components for fine-grained control. LangChain grows with your application's complexity
Resources
- Documentation — conceptual overviews and guides
- LangChain ecosystem overview — how LangChain, LangGraph, and Deep Agents fit together
- API reference — complete reference for all public classes, functions, and types
- Discussions — community forum for technical questions, ideas, and feedback
- LangChain Academy — comprehensive, free courses on LangChain libraries and products, made by the LangChain team
- Contributing Guide — how to contribute and find good first issues
- Code of Conduct — community guidelines and standards
