Skip to content

Commit fc8abe2

Browse files
authored
Merge pull request #41 from tak-bro/feature/add-cohere
Feature/add cohere
2 parents 5e3e270 + e2f0a74 commit fc8abe2

File tree

8 files changed

+1253
-50
lines changed

8 files changed

+1253
-50
lines changed

.github/workflows/no-response-issues.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: No Response
33
on:
44
issue_comment:
55
types: [created]
6+
schedule:
7+
- cron: '0 0 * * *'
68

79
jobs:
810
noResponse:

README.md

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ AICommit2 streamlines interactions with various AI, enabling users to request mu
3131
- [Anthropic Claude](https://console.anthropic.com/)
3232
- [Gemini](https://gemini.google.com/)
3333
- [Mistral AI](https://mistral.ai/)
34+
- [Cohere](https://cohere.com/)
3435
- [Huggingface **(Unofficial)**](https://huggingface.co/chat/)
3536
- [Clova X **(Unofficial)**](https://clova-x.naver.com/)
3637

@@ -72,6 +73,11 @@ aicommit2 config set GEMINI_KEY=<your key>
7273
aicommit2 config set MISTRAL_KEY=<your key>
7374
```
7475

76+
- [Cohere](https://dashboard.cohere.com/)
77+
```sh
78+
aicommit2 config set COHERE_KEY=<your key>
79+
```
80+
7581
- [Huggingface **(Unofficial)**](https://github.com/tak-bro/aicommit2?tab=readme-ov-file#how-to-get-cookieunofficial-api)
7682
```shell
7783
# Please be cautious of Escape characters(\", \') in browser cookie string
@@ -298,6 +304,8 @@ aicommit2 config set OPENAI_KEY=<your-api-key> generate=3 locale=en
298304
| `GEMINI_MODEL` | `gemini-1.5-flash-latest` | The Gemini Model |
299305
| `MISTRAL_KEY` | N/A | The Mistral API key |
300306
| `MISTRAL_MODEL` | `mistral-tiny` | The Mistral Model to use |
307+
| `COHERE_KEY` | N/A | The Cohere API Key |
308+
| `COHERE_MODEL` | `command` | The identifier of the Cohere model |
301309
| `HUGGING_COOKIE` | N/A | The HuggingFace Cookie string |
302310
| `HUGGING_MODEL` | `mistralai/Mixtral-8x7B-Instruct-v0.1` | The HuggingFace Model to use |
303311
| `CLOVAX_COOKIE` | N/A | The Clova X Cookie string |
@@ -319,14 +327,15 @@ aicommit2 config set OPENAI_KEY=<your-api-key> generate=3 locale=en
319327
> **Currently, options are set universally. However, there are plans to develop the ability to set individual options in the future.**
320328
321329
### Available Options by Model
322-
| | locale | generate | type | proxy | timeout | max-length | max-tokens | temperature | prompt |
323-
|:--------------------:|:------:|:--------:|:-----:|:-----:|:---------------------:|:-----------:|:----------:|:-----------:|:------:|
324-
| **OpenAI** ||||||||||
325-
| **Anthropic Claude** |||| | |||||
326-
| **Gemini** |||| | |||||
327-
| **Mistral AI** |||| ||||||
328-
| **Huggingface** |||| ||| | ||
329-
| **Clova X** |||| ||| | ||
330+
| | locale | generate | type | proxy | timeout | max-length | max-tokens | temperature | prompt |
331+
|:--------------------:|:------:|:--------:|:-----:|:-----:|:----------------------:|:-----------:|:----------:|:-----------:|:------:|
332+
| **OpenAI** ||||||||||
333+
| **Anthropic Claude** |||| | |||||
334+
| **Gemini** |||| | |||||
335+
| **Mistral AI** |||| ||||||
336+
| **Cohere** |||| | |||||
337+
| **Huggingface** |||| ||| | ||
338+
| **Clova X** |||| ||| | ||
330339
| **Ollama** |||| | ⚠<br/>(OLLAMA_TIMEOUT) || |||
331340

332341

@@ -430,7 +439,6 @@ The log files will be stored in the `~/.aicommit2_log` directory(user's home).
430439

431440
![log-path](https://github.com/tak-bro/aicommit2/blob/main/img/log_path.png?raw=true)
432441

433-
434442
### Ollama
435443

436444
##### OLLAMA_MODEL
@@ -555,6 +563,24 @@ Supported:
555563

556564
> The models mentioned above are subject to change.
557565
566+
### Cohere
567+
568+
##### COHERE_KEY
569+
570+
The Cohere API key. If you don't have one, please sign up and get the API key in [Cohere Dashboard](https://dashboard.cohere.com/).
571+
572+
##### COHERE_MODEL
573+
574+
Default: `command`
575+
576+
Supported:
577+
- `command`
578+
- `command-nightly`
579+
- `command-light`
580+
- `command-light-nightly`
581+
582+
> The models mentioned above are subject to change.
583+
558584
### HuggingFace Chat
559585

560586
##### HUGGING_COOKIE

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"ollama",
3131
"llama3",
3232
"llm",
33-
"chatgpt"
33+
"chatgpt",
34+
"cohere"
3435
],
3536
"license": "MIT",
3637
"repository": "tak-bro/aicommit2",
@@ -69,6 +70,7 @@
6970
"@pacote/xxhash": "^0.3.2",
7071
"axios": "^1.6.8",
7172
"chalk": "^5.3.0",
73+
"cohere-ai": "^7.10.2",
7274
"copy-paste": "^1.5.3",
7375
"figlet": "^1.7.0",
7476
"formdata-node": "^6.0.3",

0 commit comments

Comments
 (0)