gpt4all
gpt4all copied to clipboard
Refactor for csharp bindings (#2331)
Rough draft for C# bindings refactor. Looking for feedback before adding unit tests, examples, docs and support for additional operating systems.
The greatest strength of this refactor is that the Bindings folder remains untouched after running gen_bindings.ps1
. This means that no additional work is needed when updating lib bindings. We can just focus on maintaining the C# interop wrapper :)
I wouldn't normally be in favor of making such significant changes when the key problems with the binding are relatively small, but since it's been in need of a maintainer since last July and has been essentially unusable for a while, I say go for it :)
Few weekends ago I had a bit of free time so I started working to update the bindings to the latest iteration of the backend (+ fixing the NuGet package) as discussed here, but I'm already struggling to find time; so if someone who can contribute with more continuity wants to take over it would probably be beneficial for the project.
Talking about this PR, The changes are significant as it's almost a complete re-write and it takes a very different approach from mine so I'm not able to review this. I can eventually help for troubleshooting here and there if needed.
I'm sorry but sadly I cannot keep up with side projects as I would like to.
Alrighty just wanted to get this out asap and get some feedback to make sure i wasn't wasting my time. Sounds like I can put a little more elbow grease into this project. I'll get to work and update this PR as I go 👍🏻
lmk what features from the base library are mvp or worth adding, I would like to get this merged this week. Also, what level of documentation is expected here?
Nomic's official Python binding is a good example of what a basic binding should look like - downloading, models3.json metadata, generation, and chat sessions are key. It and the node.js binding are both on the actual docs website (which is generated and uploaded via CircleCI), which is good to have. It would also be good to be able to download it via NuGet instead of having to build it from source (which we were trying to get working with the existing C# binding).
This PR is stale. Feel free to reopen if/when more progress has been made towards a new C# binding.