chenweiyi / ai-assistant

A chatbot powered by GPT for AI assistance⚡️

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

中文文档

An AI Assistant

This is an AI project that integrates various open source AI capabilities.

Project Introduction

Screenshot

Let everyone have the ability to use AI.

Node Version

Node version >= 18 is required.

Environment Variables

In root directory, copy an .env.example file and rename it to .env, then modify its fields:

# Server Port, eg: 3000
SERVER_PORT=3000

# CUSTOM_PROXY represents an http proxy. If left blank or not passed any value,
# it means that the http proxy is not enabled.
# eg: http://127.0.0.1:7890
CUSTOM_PROXY=
  • CUSTOM_PROXY: represents an http proxy. If left blank or not passed any value, it means that the http proxy is not enabled.

How to Develop?

  1. Add a new .env file locally and configure the corresponding parameters.
  2. First install dependencies, install code using pnpm i in the root directory.
  3. Start the project: execute npm run dev in the root directory.
  4. Access the project address: http://localhost:3000.

How to Use?

Method 1: One-click Startup

Execute npm start in the root directory.

Method 2: Separate Front-end and Back-end Startup

  1. Start front-end:pnpm run dev:fe.
  2. Start back-end:pnpm run dev:be.
  3. Access front-end project address, eg:http://localhost:8000.

Method 3: Get from Docker

Get from here

Get Image

docker image pull cwy829/ai-assistant

Start Container

In the command below, ~/docker-data/.env needs to be replaced with the address where your .env file is located. For more information on .env, please refer to here.

docker run -d -p 3000:3000 -v ~/docker-data/.env:/ai-assistant/.env --name ai-assistant cwy829/ai-assistant

Docker client startup configuration

docker run

For more information about Docker, please refer to the documentation.

About

A chatbot powered by GPT for AI assistance⚡️

License:MIT License


Languages

Language:TypeScript 68.4%Language:Less 25.1%Language:JavaScript 5.4%Language:Dockerfile 0.8%Language:Pug 0.2%Language:CSS 0.1%Language:Shell 0.0%