Git Product home page Git Product logo

demo-hotel's Introduction

酒店查询客服

codecov CI

酒店原始数据

对话原始数据

  • 📦 基本的setup.py文件,用于提供安装、打包和分发服务,模板使用setuptools
  • 🤖 带有常用命令的Makefile,用于安装、测试、清理、格式化和发布您的项目。
  • 🐋 带有Dockerfile和docker-compose.yml,用于构建容器镜像和依赖的服务。
  • 📃 使用mkdocs的文档结构
  • 🧪 使用pytest的测试结构
  • ✅ 使用flake8进行代码清理
  • 📊 使用codecov生成代码覆盖率报告

安装与使用

第一步:安装依赖

pip install -r requirements.txt

第二步:准备环境变量

进入项目目录,并且复制 .env.example 生成新的配置文件 .env
cp .env.example .env
准备好环境变量:

ps: .env.example 给大家带的配置文件仅供参考

OPENAI_API_KEY=
WEAVIATE_URL=
WEAVIATE_API_KEY=
去 OpenAI 官方获取

OPENAI_API_KEY 从 OpenAI 官方获取 api 的 key

获取 weaviate 向量数据库相关配置

去官网 https://console.weaviate.cloud/ 注册登录,可以免费创建向量数据库,然后复制相关配置 WEAVIATE_URL WEAVIATE_API_KEY

  • 注意:免费的有效期 14天

第三步:初始化数据

执行下面命令
python -m hotel_chatbot cli
在弹出的界面输入:

第一步输入:create #用于创建数据结构

第二步输入:insert #用于初始化数据

第二步输入:exit #退出

第四步:启动 web 界面

python -m hotel_chatbot web

建议问题:

  • 推荐一下奢华的酒店
  • 帮忙推荐一下可以打牌的酒店

备注

1.查看帮助 python -m hotel_chatbot --help 2.可安装到全局使用 python setup.py install

如果你会 Docker

可以私有化本地部署向量数据库,在根目录直接执行命令。

连接数据库的配置需要更改

docker-compose up -d

Cli 提问方式

web网页界面提问方式:

demo-hotel's People

Contributors

toddlt avatar sunner 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.