Skip to content

Commit

Permalink
fix: Fixed the issue where the model list could not be loaded normall…
Browse files Browse the repository at this point in the history
…y in some scenarios

doc: Add Cloudflare one-click deployment feature
  • Loading branch information
Amery2010 committed Dec 31, 2024
1 parent 53c0e1f commit cec49a5
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 12 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ Deploy your private Gemini application for free with one click, supporting Gemin

**English** · [简体中文](./README.zh-CN.md)

[![Vercel](https://img.shields.io/badge/Vercel-111111?style=flat&logo=vercel&logoColor=white)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fu14app%2Fgemini-next-chat&project-name=gemini-next-chat&env=GEMINI_API_KEY&env=ACCESS_PASSWORD&repository-name=gemini-next-chat)
[![Cloudflare](https://img.shields.io/badge/Cloudflare-F69652?style=flat&logo=cloudflare&logoColor=white)](https://deploy.workers.cloudflare.com/?url=https://github.com/u14app/gemini-next-chat)

[![Gemini](https://img.shields.io/badge/Gemini-8E75B2?style=flat&logo=googlegemini&logoColor=white)](https://ai.google.dev/)
[![Next](https://img.shields.io/badge/Next.js-000000?style=flat&logo=nextdotjs&logoColor=white)](https://nextjs.org/)
[![Next](https://img.shields.io/badge/Next.js-111111?style=flat&logo=nextdotjs&logoColor=white)](https://nextjs.org/)
[![Tailwind CSS](https://img.shields.io/badge/Tailwind%20CSS-06B6D4?style=flat&logo=tailwindcss&logoColor=white)](https://tailwindcss.com/)
[![shadcn/ui](https://img.shields.io/badge/shadcn/ui-000000?style=flat&logo=shadcnui&logoColor=white)](https://ui.shadcn.com/)
[![shadcn/ui](https://img.shields.io/badge/shadcn/ui-111111?style=flat&logo=shadcnui&logoColor=white)](https://ui.shadcn.com/)

[![Web][Web-image]][web-url]
[![MacOS][MacOS-image]][download-url]
Expand Down Expand Up @@ -119,8 +122,12 @@ A cross-platform application client that supports a permanent menu bar, doubling
## Get Started

1. Get [Gemini API Key](https://aistudio.google.com/app/apikey)
2. Click
2. One-click deployment of the project, you can choose to deploy to Vercel or Cloudflare

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fu14app%2Fgemini-next-chat&project-name=gemini-next-chat&env=GEMINI_API_KEY&env=ACCESS_PASSWORD&repository-name=gemini-next-chat)

[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/u14app/gemini-next-chat)

3. Start using

### Updating Code
Expand Down
13 changes: 10 additions & 3 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@

[English](./README.md) · **简体中文**

[![Vercel](https://img.shields.io/badge/Vercel-111111?style=flat&logo=vercel&logoColor=white)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fu14app%2Fgemini-next-chat&project-name=gemini-next-chat&env=GEMINI_API_KEY&env=ACCESS_PASSWORD&repository-name=gemini-next-chat)
[![Cloudflare](https://img.shields.io/badge/Cloudflare-F69652?style=flat&logo=cloudflare&logoColor=white)](https://deploy.workers.cloudflare.com/?url=https://github.com/u14app/gemini-next-chat)

[![Gemini](https://img.shields.io/badge/Gemini-8E75B2?style=flat&logo=googlegemini&logoColor=white)](https://ai.google.dev/)
[![Next](https://img.shields.io/badge/Next.js-000000?style=flat&logo=nextdotjs&logoColor=white)](https://nextjs.org/)
[![Next](https://img.shields.io/badge/Next.js-111111?style=flat&logo=nextdotjs&logoColor=white)](https://nextjs.org/)
[![Tailwind CSS](https://img.shields.io/badge/Tailwind%20CSS-06B6D4?style=flat&logo=tailwindcss&logoColor=white)](https://tailwindcss.com/)
[![shadcn/ui](https://img.shields.io/badge/shadcn/ui-000000?style=flat&logo=shadcnui&logoColor=white)](https://ui.shadcn.com/)
[![shadcn/ui](https://img.shields.io/badge/shadcn/ui-111111?style=flat&logo=shadcnui&logoColor=white)](https://ui.shadcn.com/)

[![Web][Web-image]][web-url]
[![MacOS][MacOS-image]][download-url]
Expand Down Expand Up @@ -119,8 +122,12 @@
## 开始使用

1. 获取 [Gemini API Key](https://aistudio.google.com/app/apikey)
2. 单击
2. 一键部署项目,可以选择部署到 Vercel 或者 Cloudflare

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fu14app%2Fgemini-next-chat&project-name=gemini-next-chat&env=GEMINI_API_KEY&env=ACCESS_PASSWORD&repository-name=gemini-next-chat)

[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/u14app/gemini-next-chat)

3. 开始使用

### 更新代码
Expand Down
6 changes: 3 additions & 3 deletions components/Setting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,14 @@ function Setting({ open, hiddenTalkPanel, onClose }: SettingProps) {
if (open && !cachedModelList) {
const { update } = useModelStore.getState()
const { apiKey, apiProxy, password } = useSettingStore.getState()
if (apiKey || password) {
fetchModels({ apiKey, apiProxy, password }).then((models) => {
fetchModels({ apiKey, apiProxy, password })
.then((models) => {
if (models.length > 0) {
update(models)
cachedModelList = true
}
})
}
.catch(console.error)
}
if (BUILD_MODE === 'export') {
setHiddenPasswordInput(true)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gemini-next-chat",
"version": "1.2.0",
"version": "1.2.1",
"private": true,
"author": "Amery2010 <[email protected]>",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gemini-next-chat"
version = "1.2.0"
version = "1.2.1"
description = "Your private Gemini application."
authors = ["Amery2010<[email protected]>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"productName": "gemini-next-chat",
"mainBinaryName": "gemini-next-chat",
"version": "1.2.0",
"version": "1.2.1",
"identifier": "com.u14.app",
"plugins": {},
"app": {
Expand Down

0 comments on commit cec49a5

Please sign in to comment.