We would love to accept your patches and contributions to this project.
Contributions to this project must be accompanied by a Contributor License Agreement (CLA). You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project.
If you or your current employer have already signed the Google CLA (even if it was for a different project), you probably don't need to do it again.
Visit https://cla.developers.google.com/ to see your current agreements or to sign a new one.
This project follows Google's Open Source Community Guidelines.
- Clone this repo
- Run tests with
go test ./...
; the "live" tests will be skipped unless a valid API key is set with theGEMINI_API_KEY
environment variable.
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose.
Install the pre-push hook:
cp devtools/pre-push-hook.sh .git/hooks/pre-push
This repo consists of a single Go module. To increase the minor or patch version of the module:
- Run
git pull --tags
to get the up-do-date upstream tags. - Determine the desired tag, using
git tag -l
to see existing tags and incrementing as appropriate. We will call the result TAG in these instructions. It should be of the formvX.Y.Z
. - Update the version in genai/internal/version.go to match TAG.
- Send a PR with that change. The pre-push hook should complain, so
pass the
--no-verify
flag togit push
. - Submit the PR when approved. No other PRs should be submitted until the following steps have been completed.
- Run
git pull
to get the submitted PR locally. You should be on main. - Run
git tag TAG
to tag the repo locally. - Run
git push origin TAG
. If the pre-push hook complains here, something is wrong; stop and review. - Use the GitHub UI to
create the release. Use TAG as the name.
Provide release notes by summarizing the result of
git log PREVTAG..
, where PREVTAG is the previous release tag. - Visit https://pkg.go.dev/github.com/google/generative-ai-go@TAG and request that the version be processed.