LangChain (@LangChain) on X

X (formerly Twitter) ·

2 min read Original article ↗

user avatar

🔆 HighLights 🦜 All the same abstractions (prompts, LLMs, textsplitters, embeddings, vectorstores, chains, agents, memory) are now natively available in js 💿There is a common serializable format for cross-language sharing ❤️This was only doable with community support

user avatar

❓Why TypeScript? LLMs started out as popular for the ML/data engineering crowd, who prefer Python However, as the LangChain community grew over time, we started to hear a lot of requests for Javascript support And so it became a priority to deliver this

user avatar

🐍Relationship to Python Package We built the same abstractions (prompts, LLMs, etc) we had in Python In particular, we built them in a way where they share the same serializable format This means you can load the same prompt, chain, agent in both languages

user avatar

🛖LangChainHub For a collection of these serialized artifacts, check out the LangChainHub We will continue to grow this hub, and the supported number of serializable artifacts, over time LangChainHub:

user avatar

💬ChatLangChain-js As an example of how it's possible to recreate the same apps in javascript, check out "ChatLangChain-js" This is a replica of the Python version, showing off usage of LLMs, prompts, embeddings, text splitters, chains, vector dbs Repo: github.com/sullivan-sean/…

user avatar

Finally, let's walk through all the functionality we support! The core abstractions are the same, and while we may not have as many implementations in each category as the Python package, we will work tirelessly to bring them up to par

user avatar

user avatar

user avatar

user avatar

user avatar

user avatar

Again, we're really excited to see how this develops! We are extremely open to contributions and suggestions - please open PRs, file issues, DM us, or get in touch on the discord: