-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add Gemini support using Openrouter #50
Open
minhchienwikipedia
wants to merge
4
commits into
insulineru:main
Choose a base branch
from
minhchienwikipedia:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit adds support for the Gemini AI provider. It includes the necessary configuration and logic to integrate with the Gemini API, allowing users to generate commit messages using Gemini models. A new script `gemini` was added to quickly generate a commit, and updated PROVIDER_SUPPORT to include Gemini.
* - The demo and instructions are now updated to show usage with the correct env variables. I have changed the variable names to ` `AI_COMMIT_KEY_TYPE` and ` ` to prevent accidentally overwriting variables in the user environment when calling ` * The documentation flow now also requires the environment variable ` `PROVIDER``. This defaults to `openai` and the user must set the value to to either `` `ollama` or `gemini`. added. feat: Adds - chore: - Updated README. - Adds * `ai-commit-cli` `ai-commit-cli``and ` and `tests` * Updates the readme to show for the command. * `openai-kit` has been used, 0.2.0` to **fix: Fix the code generate by the ` command` and fix't the ` ` feat: Switched the 'API_KEY` variable to the correct. **feat: Add support for the user to configure a commit message type type: This message, to allow users to have a option for a commit type. - Commit the message **chore: - Adds a documentation for documentation section. [ [ - Fix ` **feat: Added a functionality to use a list option which allows the user to select from, a. Create a list of messages. * * Adds a ` --list option and ` in ` * Refactor: * Adds to a ` * Refactor`. feat: * Adds a * Updates on the - [ ] - [ ] [chore - Refactor]: refactor: adds a flag from a list of the commits **feat: Fixed a minor bug that prevents the user from reading the documentation - feat message. - Fixed the code and ` ` **feat: Implements of the `code` and `message` and the ` - Added a list option and add the functionality to read -- Add a ` * [feat: Add a feature to support for the code-gen cli` mode in the `ai-commit.ts` file. Add a Support for the `code` generator and adds a feature to support for the code-commit message generator ] - Fixes * Adds a feature to support for the code-gen and changes to the user environment. * The ` flag in `ai-commit.ts` is added. * Adds a functionality to the code generator. **feat: Add the list option and the bug fixes added: - [ ]feat: Adds a list option and the bug fixes. - Adds a list option - fix for the bug in the `index.ts` file. **feat: Fixed the bug with the variables and API - Fixed the variables being misconstrued. - Adds the bug fixed for the ` - Fix: -** feat: Adds the git hook` - Adds a ` git` hook: A ` .git` is added to the `git-hooks` folder. **feat: Adds a example for the git-hooks - The user now can use a git hook based on the ` - Adds the git hook function for the example to the` file. - Creates the example` and adds to the git-hooks` - [ ] Fix: * Adds the` **feat: Update the README.md * Adds the ` ``` ## Options ``` - Adds the code to the documentation. [ - * Fixed a bug in the readme + * Adds this code example to allow the user to create a pre-commit with the ` ``` Create a` pre-commit ``` ```shell git config core.hooksPath .git-hooks ``` - [ ] chore: Adds the ` - [ ]Fixes a error in the `ai-commit.ts` - [ ] chore: - Adds this code example to allow the user to create a pre-commit with the ``` **feat: Adds the use of the ` - Adds the user can use of the ` **feat: Add the documentation to the README.md for the --commit-type adds to the README.md for the` option` **feat: Updates the tests and adds a comment **feat: Fixes and add the support for multiple providers - The `AI_COMMIT_API_KEY` variable has been added to the documentation to make sure that the right variable is being used for the key. This should fix a problem around confusion. - Updated the documentation to indicate `gemini` as the `PROVIDER`. - The user must specify `PROVIDER` to allow the usage of `gemini`. - Fixed the usage with `ollama`. **The code changes include the following changes:** - Updated the `README.md` with documentation for the `AI_COMMIT_API_KEY` and `PROVIDER` environment variables, clarified the instructions for both `openai` and `ollama`. - Add comments to specify which provider to use. - A few tests and bug fixes. - Allows using the `--commit-type` to specify what should be used at the beginning of the message. - Adds a` hook` that allows a pre-commit. * Added functionality for the list of the commit messages. * Fixes some function signatures to handle the `code` and `message` parameters * Updated git to the latest versions. * Adds some function calls to be able to use the functionality for the `code` generator and generates the commit messages. * Adds examples for a `git hook` **feat**: Updates README.md with environment variable instructions and allows for configuring the commit message provider and type.
This commit updates the README.md to include a section on the Gemini Note, detailing the usage of the OpenRouter AI model and the ability to create an account for free access. Additionally, it modifies the gemini.js and openai.js files to set default model configurations for the `sendMessage` function in both contexts, ensuring a consistent experience.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I just added Gemini support and used
Openrouter
(https://openrouter.ai/).Why
Openrouter
? Because they support multiple free models and paid models