langchain
langchain copied to clipboard
Support for .NET
Build SDK support for .NET.
I'd be happy to contribute to the project.
While the core team probably doesn't have bandwidth to develop it at the moment, we'd love to help where possible if there are enough maintainers to a .net version!
The golang support organically developed in a similar way https://discord.com/channels/1038097195422978059/1097608449266831390
Thanks for the response @vowelparrot. I'm definitely on board with taking on support for the .NET version. I've connected with Harrison on Twitter and I'll check out the Go implementation.
@jeastham1993 i started with .net implementation in my own repository, but since i don't have that much free time my progress in not that good. you can check it out here. https://github.com/oorosh/langchain-dotnet
@oorosh ah ok, do you want to join up our efforts? I've implemented most of the base types, the LLM for OpenAI and HuggingFace, the prompts and have just started on the actual chaining. The repo is still private at the moment but I've just added you. I've got a bunch of changes I need to comitt from my other laptop as well, so it isn't quite up to date.
Sure. Btw, my repo is definitely behind what you have.
It would be awesome to collaborate in that case. I'm going to be travelling for a few hours tonight so I'll commit everything I have and then add some issues for what needs to happen next. We can split up the work then :)
yes, im up for it.
@oorosh I have just pushed an updated version of my .NET implementation that contains the basic functionality for chains, prompts and support for OpenAI and HuggingFace. If you want to review the code that would be awesome.
For anyone coming across this issue, the .NET implementation is here https://github.com/jeastham1993/langchain-dotnet
For anyone interested, I've had some initial luck calling into the official langchainjs library in .NET using Microsoft ClearScript and some specially crafted polyfills.
Why not use Semantic Kernel for .NET ? https://learn.microsoft.com/en-us/semantic-kernel/overview/
I have made some work that could be used (maybe).
- Use of Llamasharp models version 1 and 2, incl ASP.NET WebApi
- Use of OpenAI, incl a .Net Client. The use of it can be found in a Console and WPF appl in Examples, and a Test project.
- Use of Qdrant Vector database and a new .Net Client for it
- Use of Microsoft.SemanticKernel (Using the Qdrant Vector database). As written by @itorian in the comment above, I would also consider this as a good candidate for a .Net LangChain
- ImageClassification - TensorFlow.Net:
- ImageClassification - Microsoft.ML/TensorFlow
A lot of the more experimental stuff is driven from Tests, but can easily be moved into an application
Hello everyone,
I'm thrilled to introduce LangChainJSDotNet, an open-source library designed as a wrapper for LangChain.js. It offers .NET developers a seamless interface to run LangChain-based code with minimal adjustments. Given that the official JS/TS version closely mirrors the Python version, this library enables easy porting of LangChain code to .NET, unlocking the latest AI advancements and features from LangChain's vast ecosystem for the .NET community.
Your feedback and collaboration would be invaluable. Check it out here: https://github.com/iassafc/LangChainJSDotNet
Hi, @jeastham1993
I'm helping the LangChain team manage their backlog and am marking this issue as stale. From the active discussion and collaboration among users, it seems that there has been interest and efforts towards .NET support in the build SDK, including potential contributions from you and others. Additionally, there are mentions of existing work and libraries related to .NET support for LangChain, as well as a new open-source library, LangChainJSDotNet, designed as a wrapper for LangChain.js, which has received positive feedback.
Could you please confirm if this issue is still relevant to the latest version of the LangChain repository? If it is, please let the LangChain team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you!
FYI for anyone that comes upon this issue/request - here's another .NET implementation of LangChain that has been started: https://github.com/tryAGI/LangChain. I haven't worked with the project yet, but as of now I see there are still commits happening by its author and if you're interested in contributing this may be a good one to watch.
@jeastham1993 - it looks like you archived your original repo here, did you end up continuing your work anywhere else?