Skip to content

Commit

Permalink
feat(ai-cli): add support for Google Gemini Model
Browse files Browse the repository at this point in the history
This commit adds support for the Google Gemini Model to the `ai-cli` tool.

The Gemini Model is a large language model developed by Google AI. It is similar to the OpenAI GPT-3 model, but it is trained on a larger dataset and has access to real-time information.

To use the Gemini Model, you can set the `GOOGLE_API_KEY` environment variable or specify it using the `--google-api-key` parameter. You can also set it using the `ai setting` command. Need to set bot to `GeminiBot` by `ai setting --edit bot=GeminiBot`.
  • Loading branch information
yufeikang committed Feb 19, 2024
1 parent 141cb6b commit b598c88
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Release v0.5.0
---------------------------

- feat: now support Google Gemini Model. You can use `ai setting --edit bot=GeminiBot` to switch to it

Release v0.4.0
---------------------------

Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ You can set the `OPENAI_API_KEY` environment variable or specify it using the `-

If you use Azure OpenAI, you can set the `AZURE_OPENAI_API_KEY` or `AZURE_OPENAI_AD_TOKEN` environment variable. and `AZURE_OPENAI_ENDPOINT` for Azure OpenAI endpoint.

* Bard Support
* Gemini Pro

If you use the Gemini, you can set the `GOOGLE_API_KEY` or `--google-api-key` parameter. You can also set it using the `ai setting` command. Need to set bot to `GeminiBot` by `ai setting --edit bot=GeminiBot`.
Now, support `gemini-pro` mode only. You can set by `ai setting --edit mode=gemini-pro`, or `ai --mode gemini-pro`.

* Bard Support [Deprecated]

If you use the Bard Bot, you must be logged into Google Bard on at least one browser, which will automatically be detected.

Expand Down
6 changes: 6 additions & 0 deletions README_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ Workers搭建OpenAI API代理](https://github.com/noobnooc/noobnooc/discussions/

環境変数 `OPENAI_API_KEY` または `--api-key` パラメーターを使用して指定するか、`ai setting`命令を使用して指定できます。

Azure OpenAIを使用する場合は、 `AZURE_OPENAI_API_KEY` または `AZURE_OPENAI_AD_TOKEN` 環境変数を設定し、Azure OpenAIエンドポイントの `AZURE_OPENAI_ENDPOINT` を設定します。

* Gemini Pro

Geminiを使用する場合は、 `GOOGLE_API_KEY` または `--google-api-key` パラメーターを設定できます。`ai setting`命令を使用して設定できます。現在、 `gemini-pro` モードのみをサポートしています。`ai setting --edit mode=gemini-pro` または `ai --mode gemini-pro` で設定できます。

* Bing Cookie

Bing Botを使用する場合は、Bing Cookieを設定する必要があります。`ai setting`命令を使用して設定できます。
Expand Down
5 changes: 5 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

可以设定环境变量`OPENAI_API_KEY`,也可以通过`--api-key`参数指定。也可通过`ai setting`命令来设置。

* Gemini Pro

如果使用Gemini,可以设置`GOOGLE_API_KEY`或者`--google-api-key`参数。当使用gemini,请设置model为`gemini-pro`。可以通过`ai setting --edit mode=gemini-pro`来设置。或者`ai --mode gemini-pro`
和设置bot为`GeminiBot`。通过`ai setting --edit bot=GeminiBot`来设置。或者`ai --bot GeminiBot`

* Bing Cookie

如果使用Bing Bot需要设置Bing Cookie。可以通过`ai setting`命令来设置。
Expand Down
2 changes: 1 addition & 1 deletion src/ai_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.4.1"
__version__ = "0.5.0"

import logging
import re
Expand Down

0 comments on commit b598c88

Please sign in to comment.