Giter VIP home page Giter VIP logo

chatgpt-flask's Introduction

chatgpt-flask

English Version

本项目为 Python 接入OpenAI GPT-3.5模型, 简单易用,可用于快速搭建聊天机器人。
响应为RESTful协议,不包含页面,使用SSE协议对接。
什么是 SSE ? Server-Sent Events 教程 & Example Python code
项目中使用了 GPT-3.5 的API,需要自行申请 API Key。
申请链接: OpenAI

需求

  • Python 3.8+
  • GPT-3.5 API Key
  • MySQL 5.7
  • Gunicorn

配置

  1. 打开config.py文件,修改OPENAI_API_KEY为你的API Key。
  2. sql文件在sql目录下,导入到数据库中。
  3. 数据源和端口号配置在app.py文件中,修改为你的数据库配置与端口号。

使用

# 安装依赖
pip install -r requirements.txt
# 运行
gunicorn app:app --bind 0.0.0.0:port

chatgpt-flask's People

Contributors

zailiangs avatar

Stargazers

 avatar Jon Nall avatar Cabildo Ouyang avatar Xingyu Lan avatar Huiying Li avatar Like and Code on GitHub avatar Po Leung avatar Nguyen Thi Phuong Anh avatar Hanyang Chu avatar Stan Niu avatar 可爱垃圾 avatar Always Not Found avatar Hui Yu avatar Bao Nguyen avatar Pui Yi avatar Yunxiang Gao avatar Champagne the Coder avatar

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.