gpt4all icon indicating copy to clipboard operation
gpt4all copied to clipboard

Refactor for csharp bindings (#2331)

Open Reptarsrage opened this issue 9 months ago • 4 comments

Rough draft for C# bindings refactor. Looking for feedback before adding unit tests, examples, docs and support for additional operating systems.

Reptarsrage avatar May 10 '24 00:05 Reptarsrage

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 :)

Reptarsrage avatar May 10 '24 00:05 Reptarsrage

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 :)

cebtenzzre avatar May 10 '24 15:05 cebtenzzre

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.

mvenditto avatar May 10 '24 16:05 mvenditto

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 👍🏻

Reptarsrage avatar May 11 '24 04:05 Reptarsrage

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?

Reptarsrage avatar Jun 03 '24 02:06 Reptarsrage

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).

cebtenzzre avatar Jun 05 '24 14:06 cebtenzzre

This PR is stale. Feel free to reopen if/when more progress has been made towards a new C# binding.

cebtenzzre avatar Jul 16 '24 20:07 cebtenzzre