Skip to content

Latest commit

 

History

History
519 lines (321 loc) · 17.9 KB

README.en.md

File metadata and controls

519 lines (321 loc) · 17.9 KB

GroveChat

icon

一鍵免費部署你的私人 ChatGPT 網頁應用,支持 GPT3、GPT4 和 Gemini Pro 模型。

GroveChat / 企業版 / 演示 Demo / 反饋 Issues

Deploy on vercel

Table of contents

Enterprise Edition

Meet your company’s private deployment and customization needs

  • Brand customization: Enterprise-tailored VI/UI, seamlessly matching the corporate brand image
  • Resource integration: Dozens of AI resources are configured and managed uniformly by enterprise managers, and team members can use them out of the box
  • Permission management: Member permissions, resource permissions, and knowledge base permissions are clearly hierarchical and unified controlled by the enterprise-level Admin Panel
  • knowledge access: The combination of an enterprise's internal knowledge base and AI capabilities is closer to the enterprise's own business needs than general AI.
  • security audit: Automatically intercept sensitive questions and support tracing all historical conversation records, allowing AI to also comply with corporate information security regulations
  • private deployment: Enterprise-level private deployment, supporting various mainstream private cloud deployments to ensure data security and privacy protection
  • Continuous updates: Provide continuous updating and upgrading services for cutting-edge capabilities such as multi-modal and intelligent agents, which are frequently used and constantly advanced.

Enterprise version consultation:empty

Features

  • Deploy on Vercel for free with one click and takes less than 1 minute
  • Streamlined client (~5MB) for Linux/Windows/MacOS, download now
  • Fully compatible with self-deployed LLM, recommended for use with RWKV-Runner or LocalAI
  • Privacy first, all data is stored locally in the browser
  • Support Markdown: LaTex, mermaid, code highlighting, etc.
  • Responsive design, supports dark mode and PWA
  • The first screen loads quickly (about 100kb) and supports streaming response
  • New in v2: Use prompt templates (mask) to create, share and debug your chat tools
  • Automatically compress chat history to support long conversations while saving your tokens
  • Multi-language support: English, Simplified Chinese, Traditional Chinese, Japanese, French, Spanish, Italian, Turkish, German, Vietnamese, Russian, Czech, Korean, Indonesian

Get started

  1. get yours readyOpenAI API Key;
  2. Using Clerk as User Permission ManagementClerk official websiteConfiguration file
  3. Click the button on the right to start deployment:Deploy with Vercel, just log in directly with your GitHub account. Remember to fill in the API Key andUser rights managementClerk;
  4. After deployment is completed, you can start using it;
  5. (optional)Bind a custom domain name: The domain name DNS assigned by Vercel is contaminated in some areas. Bind a custom domain name to connect directly.

主界面

Configure page access password

This project has abandoned the CODE environment variable of the original project NextChat and uses the Clerk management page access password.

Step 1: Sign up for a Clerk account

Go toClerk official website, register an account and log in. After logging in, clickCreate Application(Build Application).

create application

Step 2: Choose a login option

enableEmail(required) andGoogle(optional) option, as shown below.

options

Step 3: Obtain API key

find yourNEXT_PUBLIC_CLERK_PUBLISHABLE_KEYandCLERK_SECRET_KEY. add them to.envfile, as shown below:

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=你的公開金鑰
CLERK_SECRET_KEY=你的密鑰

key

Step 4: Configure email and password

Go toConfigure > Email, phone, username(Configuration > Email, Phone, Username), make sure it is enabledEmail(e-mail),Password(password) andEmail verification code(email verification code).

options

Step 5: Configure roles and permissions

Set roles and permissions as shown in the figure below:

roles

Step 6: General settings

Go toConfigure > Settings(Configuration > Settings) and set the options as shown below:

settings

Step 7: Configure Webhooks

Set the webhook endpoint to your listening URL. ClickSigning Secret(signing key) View yourCLERK_WEBHOOK_SECRET, and add it to.envIn the archives:

CLERK_WEBHOOK_SECRET=你的webhook密鑰

settings

Step 8: Create users

Create user accounts as needed.

settings

Step 9: Build an organization

Set up an organization and add the developer's email address. Set their role toTeacher(teacher).settings

Manage multi-administrator Grove applications

Step 1: Build an organization

Click on the upper left cornerCreate Organization(Build an organization).settings

Step 2: Transfer ownership

Go toConfigure > Settings(Configuration > Settings), clickTransfer Ownership(Transfer of ownership). Set the new owner to the organization you just created.

settings

Step 3: Add additional users

Click on the upper left cornerManage(Admin) to add additional users and grant them administrative access.settingssettings

用戶登入

權限管理

environment variables

Most of the configuration items in this project are set through environment variables. Tutorial:How to modify Vercel environment variables

OPENAI_API_KEY(required)

OpenAI key, the api key you applied for on the openai account page, use English commas to separate multiple keys, so that these keys can be randomly polled.

CLERK_SECRET_KEY(required)

Clerk user management

CLERK_WEBHOOK_SECRET(required)

Clerk user management

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY(required)

Clerk user management

BASE_URL(optional)

default:https://api.openai.com

Example:http://your-openai-proxy.com

OpenAI interface proxy URL, if you manually configured the openai interface proxy, please fill in this option.

If you have issues with ssl certificate, please replaceBASE_URLThe protocol is set to http.

OPENAI_ORG_ID(optional)

Specify the organization ID in OpenAI.

AZURE_URL(optional)

Shape like: https://{azure-resource-url}/openai

Azure deployment address.

AZURE_API_KEY(optional)

Azure key.

AZURE_API_VERSION(optional)

Azure API version you can find here:Azure documentation

GOOGLE_API_KEY(optional)

Google Gemini Pro Key.

GOOGLE_URL(optional)

Google Gemini Pro Api Url。

ANTHROPIC_API_KEY(optional)

Anthropic Claude Api Key。

ANTHROPIC_API_VERSION(optional)

Anthropic Claude API version.

ANTHROPIC_URL(optional)

Anthropic Claude Api Url。

BAIDU_API_KEY(optional)

Baidu Fire Key。

BAIDU_SECRET_KEY(optional)

Baidu Secret Key。

BAIDU_URL(optional)

Baidu Fire Url。

BYTEDANCE_API_KEY(optional)

ByteDance Api Key。

BYTEDANCE_URL(optional)

ByteDance Api Url。

ALIBABA_API_KEY(optional)

Alibaba Cloud (Qianwen) API Key.

ALIBABA_URL(optional)

Alibaba Cloud (Qianwen) API Url.

IFLYTEK_URL(optional)

iFlytek Spark Api Url.

IFLYTEK_API_KEY(optional)

iFlytek Spark API Key.

IFLYTEK_API_SECRET(optional)

iFlytek Spark Api Secret.

CHATGLM_API_KEY(optional)

ChatGLM Api Key。

CHATGLM_URL(optional)

ChatGLM Api Url。

XAI_API_KEY(optional)

XAI Api Key。

XAI_URL(optional)

XAI Api Url。

PERPLEXITY_API_KEY(optional)

PERPLEXITY Api Key。

PERPLEXITY_URL(optional)

PERPLEXITY Api Url。

MOONSHOT_API_KEY(optional)

MOONSHOT Api Key。

MOONSHOT_URL(optional)

MOONSHOT Api Url

HIDE_USER_API_KEY(optional)

If you don't want users to fill in the API Key by themselves, just set this environment variable to 1.

DISABLE_GPT4(optional)

If you don't want your users to use GPT-4, just set this environment variable to 1.

ENABLE_BALANCE_QUERY(optional)

If you want to enable the balance query function, just set this environment variable to 1.

DISABLE_FAST_LINK(optional)

If you want to disable parsing prefab settings from links, set this environment variable to 1.

WHITE_WEBDAV_ENDPOINTS(optional)

If you want to add the WebDAV service addresses that are allowed to be accessed, you can use this option. The format requirements are:

  • Each address must be a complete endpoint

    https://xxxx/xxx

  • multiple addresses to,connected

CUSTOM_MODELS(optional)

Example:+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-1106-preview=gpt-4-turbomeans increaseqwen-7b-chatandglm-6bto the model list and remove from the listgpt-3.5-turbo, and willgpt-4-1106-previewThe model name is displayed asgpt-4-turbo
If you want to disable all models first and then enable specific models, you can use-all,+gpt-3.5-turbo, which means only enablinggpt-3.5-turbo

To control the model list, use+To add a model, use-To hide a model, use模型名=展示名Display names to customize the model, separated by commas.

In Azure mode, support usingmodelName@Azure=deploymentNameConfigure the model name and deployment name (deploy-name).

Example:+gpt-3.5-turbo@Azure=gpt35This configuration will display agpt35(Azure)options.
If you can only use Azure mode, then set-all,+gpt-3.5-turbo@Azure=gpt35You can make the conversation's default usegpt35(Azure)

In ByteDance mode, support the use ofmodelName@bytedance=deploymentNameConfigure the model name and deployment name (deploy-name).

Example:+Doubao-lite-4k@bytedance=ep-xxxxx-xxxThis configuration will display aDoubao-lite-4k(ByteDance)options.

DEFAULT_MODEL(optional)

Change the default model.

DEFAULT_INPUT_TEMPLATE(optional)

Customize the default template, which is used to initialize the "User Input Preprocessing" configuration item in "Settings".

STABILITY_API_KEY(optional)

Stability API key.

STABILITY_URL(optional)

Customized Stability API request address.

User model settings

login

The API Key set by the system can be used according to the user's highest authority.

Not logged in

If you are not logged in, you can fill in your own API Key in the proxy settings to use the guest model.

User role after login

guest

Role permissions can be changed in the Clerk dashboard

Clerk configuration tutorial

After configuring Clerk, teachers with teacher authority can directly manage the organization on the settings page in Grove Chat and invite members to further control the accessible models.

Add new model

code file

Find model supplier to add new model

const openaiModels = [
  "gpt-3.5-turbo",
  "gpt-3.5-turbo-1106",
  "gpt-3.5-turbo-0125",
  "gpt-4",
  "gpt-4-0613",
  "gpt-4-32k",
  "gpt-4-32k-0613",
  "gpt-4-turbo",
  "gpt-4-turbo-preview",
  "gpt-4o",
  "gpt-4o-2024-05-13",
  "gpt-4o-2024-08-06",
  "gpt-4o-2024-11-20",
  "chatgpt-4o-latest",
  "gpt-4o-mini",
  "gpt-4o-mini-2024-07-18",
  "gpt-4-vision-preview",
  "gpt-4-turbo-2024-04-09",
  "gpt-4-1106-preview",
  "dall-e-3",
  "o1-mini",
  "o1-preview",
];

Manage access rights (must be in the model supplier's model list)

  teacher: [
    "o1-mini",
    "o1-preview",
    "gpt-4o-2024-08-06",
    "gpt-4o-mini",
    "claude-3-sonnet-20240229",
    "claude-3-5-sonnet-20240620",
    "llama-3.1-sonar-small-128k-online",
    "llama-3.1-sonar-large-128k-online",
    "llama-3.1-sonar-huge-128k-online",
    "gemini-1.5-pro-latest",
    "gemini-1.5-flash-latest",
    "moonshot-v1-128k",
    "moonshot-v1-32k",
    "grok-2-1212",
    "grok-2-vision-1212",
  ],

develop

Users in mainland China can use the agent that comes with this project for development. You can also freely choose other agent addresses. BASE_URL=https://b.nextweb.fun/api/proxy

local development

  1. Create a new one in the project root directory.env.localfile, fill in the environment variables:

    OPENAI_API_KEY= CLERK_SECRET_KEY= CLERK_WEBHOOK_SECRET= NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=

  2. 安裝 Node.js 18 和 Yarn,具體細節請詢問 ChatGPT;

  3. implementyarn install && yarn devThat’s it. ⚠️ Note: This command is only for local development, do not use it for deployment!

  4. If you want to deploy locally, useyarn install && yarn build && yarn startcommand, you can use pm2 to daemonize the process to prevent it from being killed. Ask ChatGPT for details.

Container deployment

The Docker version needs to be 20 or above, otherwise it will prompt that the image cannot be found.

⚠️ Note: Most of the time, the Docker version will lag behind the latest version by 1 to 2 days, so the "update exists" prompt will continue to appear after deployment, which is normal.

docker pull robbiedood/grove-chat

docker run -d -p 3000:3000 \
   -e OPENAI_API_KEY=sk-xxxx \
   -e CLERK_SECRET_KEY=<your key here> \
   -e CLERK_WEBHOOK_SECRET=<your key here> \
   -e NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=<your key here> \
   robbiedood/grove-chat

You can also specify a proxy:

docker run -d -p 3000:3000 \
   -e OPENAI_API_KEY=sk-xxxx \
   -e CLERK_SECRET_KEY=<your key here> \
   -e CLERK_WEBHOOK_SECRET=<your key here> \
   -e NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=<your key here> \
   --net=host \
   -e PROXY_URL=http://127.0.0.1:7890 \
   robbiedood/grove-chat

If your local agent requires an account and password, you can use:

-e PROXY_URL="http://127.0.0.1:7890 user password"

If you need to specify other environment variables, please add them to the above command yourself-e 環境變量=環境變量值to specify.

local deployment

Run the following command on the console:

bash <(curl -s https://raw.githubusercontent.com/robbiedood/grove-chat/main/scripts/setup.sh)

⚠️ Note: If you encounter problems during installation, please use Docker deployment.

screenshot

設定

Related projects

  • ChatGPT-Next-Web: A one-stop large model platform that supports all major large language models on the market.

  • one-api: A one-stop large model quota management platform that supports all mainstream large language models on the market.

  • Mr.-Ranedeer-AI-Tutor:AI-Tutor

Open source agreement

WITH