Code Monkey home page Code Monkey logo

botagent's Introduction

数据库表

1、 bot_response

序号 名称 描述 类型 为空 额外 默认值
1 id bigint unsigned PRI NO auto_increment
2 created_at 记录创建时间-unix时间戳 bigint NO
3 agent_id varchar(128) NO
4 intent_id varchar(128) NO
5 intent_name longtext YES

2、 daily_intent

序号 名称 描述 类型 为空 额外 默认值
1 id bigint unsigned PRI NO auto_increment
2 date 记录创建日期-unix时间戳 bigint NO
3 agent_id varchar(128) NO
4 intent_id varchar(128) NO
5 count bigint NO

唯一约束:(date,agent_id,intent_id)同一天只用单条记录来保存某个agent_id相关的intent_id出现次数

部署方式

api服务

$ docker-compose up --build

cron定时任务

$ crontab -e

0 0 2 * * docker-compose --file cron/dock-compose.yml up --build 

根据接口注释生成swagger.json

Documentation served at http://127.0.0.1:8000/docs

$ swag init

根据generate.go生成orm代码

$ go run "dal/generate/generate.go"

为本地Mysql和Redis导入测试数据

$ go test ./test -run TestEnvInit

botagent's People

Contributors

luokd97 avatar

Stargazers

wangqs avatar

Watchers

 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.