Skip to content
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

help #169

Open
wants to merge 17 commits into
base: development
Choose a base branch
from
Open

help #169

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GeminiProChat

English | [中文](README_cn.md)
English | [中文](README_cn.md) | [Italiano](README_it.md) | [日本語](README_jp.md)

Minimal web UI for Gemini Pro Chat.

Expand All @@ -20,12 +20,12 @@ Just click the button above and follow the instructions to deploy your own copy
> #### Solution for "User location is not supported for the API use"
> If you encounter the issue **"User location is not supported for the API use"**, follow these steps to resolve it:
>
> 1. Go to this [**palm-proxy**](https://github.com/antergone/palm-proxy) repo and click **"Deploy With Vercel"**.
> 2. Once the deployment is complete, you will receive a domain name assigned by Vercel (e.g., `https://xxx.vercel.app`).
> 3. In your **Gemini Pro Chat** project, set an environment variable named `API_BASE_URL` with the value being the domain you got from deploying the palm proxy (`https://xxx.vercel.app`).
> 1. Go to this [**palm-netlify-proxy**](https://github.com/antergone/palm-netlify-proxy) repo and click **"Deploy With Netlify"**.
> 2. Once the deployment is complete, you will receive a domain name assigned by Netlify (e.g., `https://xxx.netlify.app`).
> 3. In your **Gemini Pro Chat** project, set an environment variable named `API_BASE_URL` with the value being the domain you got from deploying the palm proxy (`https://xxx.netlify.app`).
> 4. Redeploy your **Gemini Pro Chat** project to finalize the configuration. This should resolve the issue.
>
> Thanks to [**antergone**](https://github.com/antergone/palm-proxy) for providing this solution.
> Thanks to [**antergone**](https://github.com/antergone/palm-netlify-proxy) for providing this solution.

### Deploy on Railway

Expand Down
10 changes: 5 additions & 5 deletions README_cn.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GeminiProChat

[English](README.md) | 中文
[English](README.md) | 中文 | [Italiano](README_it.md) | [日本語](README_jp.md)

与 Gemini Pro 聊天的最简 WebUI。

Expand All @@ -25,12 +25,12 @@
> #### 关于 API 使用过程中 “User location is not supported for the API use” 的解决方案
> 如果你遇到了 **“User location is not supported for the API use”** 的问题,请按照以下步骤进行解决:
>
> 1. 前往 [**palm-proxy**](https://github.com/antergone/palm-proxy) 仓库并点击其中的 **“Deploy With Vercel”**。
> 2. 部署完成后,你将收到 Vercel 分配的域名 (例如 `https://xxx.vercel.app`)。
> 3. 在你的 **Gemini Pro Chat** 项目中,设置名为 `API_BASE_URL` 的环境变量,其值为部署 palm-proxy 时获得的域名 (`https://xxx.vercel.app`)。
> 1. 前往 [**palm-netlify-proxy**](https://github.com/antergone/palm-netlify-proxy) 仓库并点击其中的 **“Deploy With Netlify**。
> 2. 部署完成后,你将收到 Netlify 分配的域名 (例如 `https://xxx.netlify.app`)。
> 3. 在你的 **Gemini Pro Chat** 项目中,设置名为 `API_BASE_URL` 的环境变量,其值为部署 palm-proxy 时获得的域名 (`https://xxx.netlify.app`)。
> 4. 重新部署你的 **Gemini Pro Chat** 项目来完成配置。这应该可以解决问题。
>
> 感谢 [**antergone**](https://github.com/antergone/palm-proxy) 提供解决方案。
> 感谢 [**antergone**](https://github.com/antergone/palm-netlify-proxy) 提供解决方案。

### 使用 Railway 部署

Expand Down
10 changes: 5 additions & 5 deletions README_it.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GeminiProChat

[English](README.md) | [中文](README_cn.md) | Italiano
[English](README.md) | [中文](README_cn.md) | Italiano | [日本語](README_jp.md)

Interfaccia utente web minimale per Gemini Pro Chat.

Expand All @@ -21,12 +21,12 @@ Clicca sul pulsante in alto e seguire le istruzioni per distribuire la tua copia
> #### Soluzione per "User location is not supported for the API use"
> Se riscontri il problema **"User location is not supported for the API use"**, segui questi passaggi per risolverlo:
>
> 1. Vai a questo repository [**palm-proxy**](https://github.com/antergone/palm-proxy) e fai clic su **"Deploy With Vercel"**.
> 2. Una volta completata la distribuzione, riceverai un nome di dominio assegnato da Vercel (ad esempio, `https://xxx.vercel.app`).
> 3. Nel tuo progetto **Gemini Pro Chat**, imposta una variabile di ambiente denominata "API_BASE_URL" con il valore corrispondente al dominio ottenuto dalla distribuzione del proxy Palm (`https://xxx.vercel.app`).
> 1. Vai a questo repository [**palm-netlify-proxy**](https://github.com/antergone/palm-netlify-proxy) e fai clic su **"Deploy With Netlify"**.
> 2. Una volta completata la distribuzione, riceverai un nome di dominio assegnato da Netlify (ad esempio, `https://xxx.netlify.app`).
> 3. Nel tuo progetto **Gemini Pro Chat**, imposta una variabile di ambiente denominata "API_BASE_URL" con il valore corrispondente al dominio ottenuto dalla distribuzione del proxy Palm (`https://xxx.netlify.app`).
> 4. Ridistribuisci il tuo progetto **Gemini Pro Chat** per finalizzare la configurazione. Questo dovrebbe risolvere il problema.
>
> Grazie a [**antergone**](https://github.com/antergone/palm-proxy) per fornire questa soluzione.
> Grazie a [**antergone**](https://github.com/antergone/palm-netlify-proxy) per fornire questa soluzione.
>

### Distribuire Con Railway
Expand Down
121 changes: 121 additions & 0 deletions README_jp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# GeminiProChat

[English](README.md) | [中文](README_cn.md) | [Italiano](README_it.md) | 日本語

WebUIでGemini Proとチャットしましょう!

Demo: [Gemini Pro Chat](https://www.geminiprochat.com)

[![image](https://github.com/babaohuang/GeminiProChat/assets/559171/d02fd440-401a-410d-a112-4b10935624c6)](https://www.geminiprochat.com)

## デプロイ

### Vercelでデプロイ(推奨)

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/babaohuang/GeminiProChat&env=GEMINI_API_KEY&envDescription=Google%20API%20Key%20for%20GeminiProChat&envLink=https://makersuite.google.com/app/apikey&project-name=gemini-pro-chat&repository-name=gemini-pro-chat&demo-title=Gemini%20Pro%20Chat&demo-description=Minimal%20web%20UI%20for%20Gemini%20Pro.&demo-url=https%3A%2F%2Fgeminiprochat.com&demo-image=https%3A%2F%2Fgeminiprochat.com%2Ficon.svg)

上記のボタンをクリックして、手順に従ってアプリのコピーデプロイできます。

> [!NOTE]
> #### **"User location is not supported for the API use"** の解決策
> **"User location is not supported for the API use"** のissueあれば,次の手順で解決します。
>
> 1. Repo [**palm-netlify-proxy**](https://github.com/antergone/palm-netlify-proxy) の **“Deploy With Netlify”** をクリック。
> 2. デプロイ完了でNetlifyからドメイン名(例えば`https://xxx.netlify.app`)をゲット。
> 3. **Gemini Pro Chat** コピープロテクトで,環境変数`API_BASE_URL`を設定する。palm proxyをデプロイして得たドメイン(https://xxx.vercel.app)を値として使用する。
> 4. **Gemini Pro Chat** 再デプロイする。
>
> [**antergone**](https://github.com/antergone/palm-netlify-proxy) さんからの解決策にありがとうございます。

### Railwayでデプロイ

[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/v9QL5u?referralCode=tSzmIe)

上記のボタンをクリックして、手順に従ってRailwayにデプロイできます。

### eaburでデプロイ

[![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/1103PJ)

上記のボタンをクリックして、手順に従ってeaburにデプロイできます。

### Dockerでデプロイ

Dockerでデプロイしたい方は、次のコマンドを実行し出来ます。

```bash
docker run --name geminiprochat \
--restart always \
-p 3000:3000 \
-itd \
-e GEMINI_API_KEY=your_api_key_here \
babaohuang/geminiprochat:latest
```
`your_api_key_here`に自分のGemini API keyを置き換えてください。

これで **geminiprochat** サービスをスタート、urlは http://localhost:3000。

## 環境変数

環境変数でウェブサイトを設定できます。

| 変数 | 説明 | 必要 |
| --- | --- | --- |
| `GEMINI_API_KEY` | Gemini API key。[ここ](https://makersuite.google.com/app/apikey)でゲット。| **✔** |
| `API_BASE_URL` | Gemini APIのカスタムbase url。[ここ](https://github.com/babaohuang/GeminiProChat/README_cn.md#solution-for-user-location-is-not-supported-for-the-api-use)で使い方をご覧ください。| ❌ |
| `HEAD_SCRIPTS` | ウェブページの`</head>`前にscriptを入ってください。 | ❌ |
| `PUBLIC_SECRET_KEY` | プロジェクトの秘密文字列。APIコールのジェネレートシグネチャーために使います。 | ❌ |
| `SITE_PASSWORD` | ウェブサイトのパスワードを設定する。コンマ使って複数のパスワードもできる。設定しないウェブサイトは公開サイトになる。| ❌ |

## ローカルでの実行

### 要求環境
1. **Node**: `Node v18` 以上の開発まだはデプロイ環境。[nvm](https://github.com/nvm-sh/nvm) 使って`node`バージョンを管理できます。

```bash
node -v
```

2. **PNPM**: [pnpm](https://pnpm.io/) 使って依存関係を管理する推奨。pnpm使ってない方は以下のコメントでインストールできます。

```bash
npm i -g pnpm
```

3. **GEMINI_API_KEY**: アプリを使ってため、GoogleからAPI keyをゲットする必要です。[https://makersuite.google.com/app/apikey](https://makersuite.google.com/app/apikey)からAPI keyを申込してください 。

### デプロイ

1. 依存関係のインストールしてください。

```bash
pnpm install
```

2. ファイル`.env.example`をコピーし、 `.env`に名前を変更し、そのファイルに[`GEMINI_API_KEY`](https://makersuite.google.com/app/apikey)を入ってください。

```bash
GEMINI_API_KEY=AIzaSy...
```

3. アプリを実行すると、`http://localhost:3000/`にご覧ください。

```bash
pnpm run dev
```

## 謝辞

このアプリは以下のRepoを基づいて開発しました。

- [ChatGPT-Demo](https://github.com/anse-app/chatgpt-demo)

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=babaohuang/geminiprochat&type=Timeline)](https://star-history.com/#babaohuang/geminiprochat&Timeline)

## Buy me a coffee

このアプリは役に立ちあれば、コーヒー一杯ちょうだい?😄

<a href="https://www.buymeacoffee.com/babaohuang" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
2 changes: 1 addition & 1 deletion src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</div>

<p class="flex flex-wrap justify-center items-center text-xs op-30 my-2">
© 2023&nbsp;<a href="https://geminiprochat.com" target="_blank" class="font-bold">Gemini Pro Chat</a>. All rights reserved.
© 2024&nbsp;<a href="https://geminiprochat.com" target="_blank" class="font-bold">Gemini Pro Chat</a>. All rights reserved.
</p>

<div class="flex flex-wrap justify-center items-center text-xs op-30 my-2">
Expand Down
Loading
Loading