Skip to content

Latest commit

 

History

History
259 lines (177 loc) · 10.4 KB

README_EN.md

File metadata and controls

259 lines (177 loc) · 10.4 KB

Info Apache License


Logo

Open Source Yuan LLM Chat Application
Yuan Home Page »

English / 简体中文

🎉 最近更新


Table of Contents
  1. About The Project
  2. Getting Started
  3. Roadmap
  4. Contributing
  5. License

About The Project

YuanChat Screen Shot

YuanChat is a part of Yuan-2.0 project, it is a client side application for Yuan-2.0. YuanChat provides an easy way to make users communicate with Yuan-2.0, users can easily test and use Yuan-2.0 LLM models.

(back to top)

Built With

Thanks for these awesome projects:

FastAPIVueNodeJS

(back to top)

Getting Started

1. Deploy with Docker

1.1 Prerequisites

Before deploy with docker, you need to install:

1.2 Deploy

We provide a prebuilt image for YuanChat, you can directly deploy this project with one command.

docker run --rm -d --name yuanchat -p 5050:5050 -e YUAN_2_URL=http://ip:port/yuan yuanmodel/yuanchat:latest

Here, YUAN_2_URL=http://ip:port/yuan is the url of Yuan-2.0 model server, ip is the ip address of your Yuan-2.0 server, and the port is the server port. eg. http://192.168.1.1:8000/yuan.

1.3 Verify

Open link http://localhost:5050 in browser , if everything ok, you will see this page:

YuanChat Screen Shot

(back to top)


2. Deploy with source

Build and deploy your own version with source code.

2.1 Prerequisites

Before deploy with source code, you need to setup development environment:

2.2 Deploy

2.2.1 Download source code
git clone https://github.com/IEIT-Yuan/YuanChat.git
2.2.2 Generate static files
cd YuanChat/src/webui
npm install
npm run build

For more webui details, please read the webui README

2.2.3 Modify project config file

If your Yuan-2.0 model server address is not http://127.0.0.1:8000, you need to specify the to the right server address in YuanChat/src/python/yuan_processing/as_constants.py for param YUAN_2_URL, such as YUAN_2_URL=http://192.168.1.1:8000/yuan

For more python server details, please read the python server README

2.2.4 Install python packages
cd YuanChat
pip install -r requirements.txt
2.2.5 Start python server
cd YuanChat
bash start.sh

2.2.6 Web UI customization

  • To modify the logo in the upper left corner of the Yuan Chat Web UI, you need replace /src/webui/public/logo.png with a pre prepared logo image. It is recommended that the image size be 120 * 48.

  • To modify the welcome message for the conversation in the Yuan Chat, you need modify the language configuration in /src/webui/src/locales/lang/en.js . Specifically, the following content needs to be modified:

   welcomeHeader: 'I am YuanChat, a dialogue application based on Yuan 2.0 large language model.',
  welcomeParagraph1:'I am capable of engaging in multi-turn conversations, answering domain-specific questions, and assisting individuals in application writing and artistic creation.',
  • To modify the recommended questions of the Yuan Chat, you need modify the content in /src/webui/public/recommends.json .

When you are in the local development mode of the web UI (please refer to README), the above modifications will take effect immediately. If you want to deploy, please refer to Deploy with source

2.3 Verify

Open link http://localhost:5050 in browser , if everything ok, you will see this page:

YuanChat Screen Shot

Roadmap

  • Add README_zh.md

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the YuanChat License. See YuanChat LICENSE file for more information.
Distributed under the Apache License 2.0. See LICENSE file for more information.

(back to top)