valentinegb / openai

An unofficial Rust library for the OpenAI API.
https://crates.io/crates/openai/
MIT License
61 stars 18 forks source link

Use a more permissive license #29

Closed mitsuhiko closed 1 year ago

mitsuhiko commented 1 year ago

Problem

The license of this package (being AGPL) is prohibitive that it cannot be used in a lot of environments. Would it be possible to relicense this under MIT/BSD/Apache2?

Solution

Pick a more liberal license.

Alternatives

No response

valentinegb commented 1 year ago

Please correct me if I'm wrong, but as far as I'm aware, the AGPL license's main prohibition is developing forks of the library without making it public or contributing back to the original. I'm absolutely willing to work things out, could you please explain what kind of environments wouldn't work with the current license?

valentinegb commented 1 year ago

I think I might have found what you mean actually...

conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license.

valentinegb commented 1 year ago

It looks like LGPL is generally the same as the current license, except "larger works" (which I'm assuming to be any project that depends on the library) may remain closed source and not use the same license. How's that sound?

valentinegb commented 1 year ago

The license has been changed as of a6ff33d and will be in effect in the next release :+1:

mitsuhiko commented 1 year ago

LGPL works for my experimental case. However in general I think you will run into similar issues with LGPL further down the line.

nagibyro commented 1 year ago

Also going to add in a voice for using a more permissive license such as MIT or Apache 2.0.

All the GPL style licenses have some kinda of condition on whether the copyleft clause applies which usually means in a business setting at either my work or in my own business I can't be sure it's safe to use without consulting a lawyer or the legal department (many company's have a blanket ban for the use of GPL style licenses in their software in the general case). LGPL is the most permissive of them but my understanding (not a laywer so make sure you do your own research) is it can in some circumstances lead to legal issues. this blog post and synks gpl explained give a good overview.

It's also worth noting that the openai python lib is MIT licensed and other big libraries like AWS-SDK and Github SDK's have either apache 2.0 or MIT in general.

Appreciate the work you're putting into this library!

valentinegb commented 1 year ago

Thank you for your input, @nagibyro.

The reason I chose the GPL license (and then the LGPL license) is because I want to make sure that developers make contributions that everyone benefits from, however that blog post made a good point: it's not very nice to be required to contribute, if any changes are made.

I think it's valid to say that pretty much everyone likes to see an MIT license, and because of that it's the one I should use. Even OpenAI suggests the MIT license specifically in libraries made for their API. So while it disappoints me a little to think that a company might fork a proprietary version of my library, I will trust that more developers will share their improvements.

Thank you again, it looks like the license will be changing once more 😅

valentinegb commented 1 year ago

Aaaand done, as of 309e2d0