google-gemini / generative-ai-python

The official Python library for the Google Gemini API
https://pypi.org/project/google-generativeai/
Apache License 2.0
1.65k stars 330 forks source link

Clarify google-ai-generativelanguage version #320

Open BastianZim opened 6 months ago

BastianZim commented 6 months ago

Hi,

I'm in the process of adding google-generativeai to conda-forge here: https://github.com/conda-forge/staged-recipes/pull/26259

One of the dependencies, google-ai-generativelanguage is not yet on conda-forge so I am adding that as well but it is not clear to me from the setup.py which version I need to specify?

Ref: https://github.com/google-gemini/generative-ai-python/blob/a96feda3b5dfe0709bde023b8025ac0f7595f5b3/setup.py#L45

Conda-forge cannot use prebuilt and downloadable files as we built everything ourselves on our infrastructure so would it be possible to clarify if that version is downloadable as a source distribution from somewhere and what version it has? Currently, I have it specified as ==0.6.2 but I would assume that is not correct.

Thank you!

markmcd commented 6 months ago

You stumbled on a temporary value that allows us to install from HEAD while we work on unreleased features. Please do not ship copies of the SDK using code built from HEAD to package managers - you should be able to find what you need in the versioned tags.

However, I'm not 100% sure you can or should maintain our packages on another distribution channel. I'll consult with some people internally and see if it's OK, but in the meantime please pause! I'm excited about having another distribution channel but I would hate for you do to this work only to have our security or legal team ask you to take it all down.

MarkDaoust commented 6 months ago

Yes, this was waiting for 0.6.3.

I'll consult with some people internally and see if it's OK

And whatever they say here, you'd probably only want to release our actual releases. main is unstable.

BastianZim commented 6 months ago

Hi everyone, thanks for the response!

Just to clarify:

  1. I am building off of GitHub and PyPI releases and not any branches or downloads so only stable code should be included. Conda forge works based on versions so that is the only way I can distribute anything anyways. Also, we don't ship WIP code.
  2. The license of both packages is Apache 2.0 so distribution is legal but of course, I'll hold off on these until you have confirmed it. In case distribution is not allowed, it would probably be good though to change the licenses to something proprietary that prohibits distribution or others will do the same.
  3. Yes, I have specified 0.6.2 as a placeholder for now and once 0.6.3 is available, I would upgrade and distribute the second package. Conda-forge cannot redistribute binaries or any other compiled code so that wouldn't work either way :)
  4. Is there a public timeline for when new releases are published?

Thanks! :)

MarkDaoust commented 6 months ago

0.6.3 came out yesterday: https://pypi.org/project/google-ai-generativelanguage/#history

Apache 2.0 so distribution is legal but of course

If there's any issue I expect that it would be around people thinking that those packages are provided by google, when it's actually you. But we'll see what answer @markmcd gets back.

Is there a public timeline for when new releases are published?

No, it's just whenever we think it's necessary.

BastianZim commented 6 months ago

Ahh perfect, thank you!

Conda-forge is a known redistribution platform and most of the packages are not submitted by the original package distributor so that shouldn't be an issue but let's wait. I'm also happy to add anyone as a co-maintainer, if there is interest?

Ok makes sense thanks.

MarkDaoust commented 4 months ago

@markmcd