GithubHelp home page GithubHelp logo

dueros's Introduction

DuerOS java sdk

DuerOS

java 版本sdk

添加百度技能基本的sdk (不包含回复卡片等高级信息)

duer-bot

运行 xin.yysf.app.DuerOsBotDemo

更详细的说明

示例

2017年11月20日更新添加技能测试功能

1.修改位于com.baidu.duer.dcs.framework.message.DcsRequestBody的类

com.baidu.duer.dcs.framework.message.DcsRequestBody

2.添加技能,其中参数为技能的id

debug.put("bot",new Bot("f0b8d11f-f237-0ec0-7d88-18904b5c0fc0"));

使用

在demo-test/src/main/resources/目录下创建duer.properties,输入,并配置好Oauth回调为 http://127.0.0.1:8080/auth

clientId=clientId
clientSecret=clientSecret

然后运行demo-test项目下

你可以直接运行控制台程序

java xin.yysf.gui.DuerOsCmd

如果运行gui需要安装相关的gui插件来实现浏览器的展示

javafx gui实现

java xin.yysf.gui.DuerOsCmd gui

使用swt之前,你可能还需要安装它,用来支持浏览器显示

sudo apt-get install libwebkitgtk-1.0-0

swt gui实现

java xin.yysf.gui.DuerOsSwtGui

树莓派环境下运行gui,需要配置swt运行环境

sudo apt-get install libwebkitgtk-1.0-0
apt-get install libswt-webkit-gtk-4-jni 
sudo apt-get install libswt-gtk-4-jni
sudo apt-get install libswt-gtk-4-java

mvn package
cd demo-test/target
mkdir BOOT-INF
mkdir lib
cp ../../lib/swt-gtk-4.3.2-arm.jar ./BOOT-INF/lib/.
jar -uf0 demo-test-1.0-SNAPSHOT.jar ./BOOT-INF/lib/swt-gtk-4.3.2-arm.jar
java -jar demo-test-1.0-SNAPSHOT.jar gui

播放音乐示例

java9 以下的jdk如要启用http2需要在添加vm参数

-Xbootclasspath/p:${settings.localRepository}/org/mortbay/jetty/alpn/alpn-boot/${alpn-boot.version}/alpn-boot-${alpn-boot.version}.jar.
-Xbootclasspath/p:/G:/maven/repository/org/mortbay/jetty/alpn/alpn-boot/8.1.11.v20170118/alpn-boot-8.1.11.v20170118.jar

dueros's People

Contributors

starofys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dueros's Issues

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.