GithubHelp home page GithubHelp logo

jansora / chatbot Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 385 KB

A web chatbot build with openapi offical apt (openai 官方 api )

Home Page: https://chatbot.jansora.com/

License: MIT License

Python 7.19% JavaScript 63.29% HTML 28.64% Less 0.42% Shell 0.46%
openai react demo python tornado

chatbot's Introduction

chatbot

A web chatbot client build with openapi offical api

Demo: https://chatbot.jansora.com/

  1. 模仿微信聊天输入框
  2. 已适配移动端
  3. 已适配暗黑模式

部署说明

部署准备:

  1. 海外的服务器 (openai 需要梯子)
  2. openai 账户以及密钥 (3个月内限免 18 美刀) ,具体请查看 https://platform.openai.com/account/api-keys
  3. 需要 python3.10 环境支持 部署配置: 很省资源, 几乎为零, 可部署在 1C 512M 的服务器上

安装依赖

pip3 install tornado openai==0.27.0 --upgrade -i https://mirrors.aliyun.com/pypi/simple/

部署

指定环境变量 export OPENAI_TOKEN=sk-* (替换成自己的)

部署后端服务

python3 backend/app.py

后台运行 nohup python3 backend/app.py &

nginx 前后端部署参考

server {

    listen 443 ssl http2;
    server_name chatbot.jansora.com;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_certificate     /etc/nginx/certs/lets-encrypt-jansora.com/jansora.com.cer;
    ssl_certificate_key /etc/nginx/certs/lets-encrypt-jansora.com/jansora.com.key;

    location / {
      root /data/ci/nginx/deploy/chatbot/dist;
      try_files $uri /index.html;
    }

    location /api {
      proxy_pass http://127.0.0.1:23386;
    }

}

部分截图

Web img.png

移动端

img.png

日间模式

img_1.png

QA

如果你需要定制化开发前端, 前端有引用部分私有仓库包, 私有仓库包的源代码在 https://github.com/Jansora/packages , 如何下载私有仓库包请查阅 https://share.jansora.com/notebook/a2eea824fbb06884b8abb5e35d579aaf

chatbot's People

Contributors

jansora avatar

Watchers

 avatar

Forkers

nomiscientist

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.