Skip to content

Commit

Permalink
docs: enhance API service documentation and configuration
Browse files Browse the repository at this point in the history
- Add support for Ollama API service in the README
- Add detailed instructions for configuring the Gemini API service
- Remove duplicate section for Gemini API service configuration

Signed-off-by: appleboy <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Jun 2, 2024
1 parent a61a5da commit e303be7
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A CLI written in [Go](https://go.dev) language that writes git commit messages o

## Feature

* Support [Azure OpenAI Service](https://azure.microsoft.com/en-us/products/cognitive-services/openai-service), [OpenAI API](https://platform.openai.com/docs/api-reference), [Gemini][60], [Groq][30] and [OpenRouter][50].
* Support [Azure OpenAI Service](https://azure.microsoft.com/en-us/products/cognitive-services/openai-service), [OpenAI API](https://platform.openai.com/docs/api-reference), [Gemini][60], [Ollama][41], [Groq][30] and [OpenRouter][50].
* Support [conventional commits specification](https://www.conventionalcommits.org/en/v1.0.0/).
* Support Git prepare-commit-msg Hook, see the [Git Hooks documentation](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks).
* Support customize generate diffs with n lines of context, the default is three.
Expand Down Expand Up @@ -114,6 +114,20 @@ codegpt config set openai.api_key xxxxxxxxxxxxxxxx
codegpt config set openai.model xxxxx-gpt-35-turbo
```

### Support [Gemni][60] API Service

Build with the Gemini API, you can see the [Gemini API documentation][61]. Update the `provider` and `api_key` in your config file. Please create an API key from the [Gemini API][62] page.

```sh
codegpt config ser openai.provider gemini
codegpt config set openai.api_key xxxxxxx
codegpt config set openai.model gemini-1.5-flash-latest
```

[60]: https://ai.google.dev/gemini-api
[61]: https://ai.google.dev/gemini-api/docs
[62]: https://aistudio.google.com/app/apikey

### How to change to [Groq][30] API Service

Please get the `API key` from Groq API Service, please vist [here][31]. Update the `base_url` and `api_key` in your config file.
Expand Down Expand Up @@ -189,20 +203,6 @@ codegpt config set openai.model meta-llama/llama-3-8b-instruct:free
[52]:https://openrouter.ai/terms#services
[53]:https://openrouter.ai/api/v1/models

### Support [Gemni][60] API Service

Build with the Gemini API, you can see the [Gemini API documentation][61]. Update the `provider` and `api_key` in your config file. Please create an API key from the [Gemini API][62] page.

```sh
codegpt config ser openai.provider gemini
codegpt config set openai.api_key xxxxxxx
codegpt config set openai.model gemini-1.5-flash-latest
```

[60]: https://ai.google.dev/gemini-api
[61]: https://ai.google.dev/gemini-api/docs
[62]: https://aistudio.google.com/app/apikey

For including your app on openrouter.ai rankings and Shows in rankings on openrouter.ai, you can set the `openai.headers` in your config file.

```sh
Expand Down

0 comments on commit e303be7

Please sign in to comment.