mirror of
https://github.com/chatopera/cosin.git
synced 2025-08-01 16:38:02 +08:00
#63 初始化 SDK 项目 [skip ci]
This commit is contained in:
parent
cf2ecee7db
commit
af11b72756
18
cc-chatbot/.gitignore
vendored
Normal file
18
cc-chatbot/.gitignore
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*.sublime-*
|
||||||
|
*.pyc
|
||||||
|
jmeter.log
|
||||||
|
__pycache__
|
||||||
|
tmp/
|
||||||
|
node_modules/
|
||||||
|
sftp-config.json
|
||||||
|
.DS_Store
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
*.iws
|
||||||
|
*.idea
|
||||||
|
~$*.xls*
|
||||||
|
~$*.ppt*
|
||||||
|
~$*.doc*
|
||||||
|
app/target/
|
13
cc-chatbot/README.md
Normal file
13
cc-chatbot/README.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# cc-chatbot
|
||||||
|
Chatopera智能问答引擎的Java SDK.
|
||||||
|
https://docs.chatopera.com/
|
||||||
|
|
||||||
|
支持
|
||||||
|
|
||||||
|
* 创建聊天机器人
|
||||||
|
* 查询聊天机器人列表
|
||||||
|
* 更新聊天机器人画像
|
||||||
|
* 查询聊天机器人使用情况
|
||||||
|
* 管理和检索多轮对话
|
||||||
|
* 管理和检索知识库
|
||||||
|
* 检索意图识别
|
13
cc-chatbot/admin/deploy.sh
Executable file
13
cc-chatbot/admin/deploy.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
###########################################
|
||||||
|
#
|
||||||
|
###########################################
|
||||||
|
|
||||||
|
# constants
|
||||||
|
baseDir=$(cd `dirname "$0"`;pwd)
|
||||||
|
# functions
|
||||||
|
|
||||||
|
# main
|
||||||
|
[ -z "${BASH_SOURCE[0]}" -o "${BASH_SOURCE[0]}" = "$0" ] || return
|
||||||
|
cd $baseDir/../app
|
||||||
|
mvn clean deploy -Dmaven.test.skip=true
|
13
cc-chatbot/admin/gen-idea.sh
Executable file
13
cc-chatbot/admin/gen-idea.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
###########################################
|
||||||
|
#
|
||||||
|
###########################################
|
||||||
|
|
||||||
|
# constants
|
||||||
|
baseDir=$(cd `dirname "$0"`;pwd)
|
||||||
|
# functions
|
||||||
|
|
||||||
|
# main
|
||||||
|
[ -z "${BASH_SOURCE[0]}" -o "${BASH_SOURCE[0]}" = "$0" ] || return
|
||||||
|
cd $baseDir/../app
|
||||||
|
mvn idea:idea
|
13
cc-chatbot/admin/package.sh
Executable file
13
cc-chatbot/admin/package.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
###########################################
|
||||||
|
#
|
||||||
|
###########################################
|
||||||
|
|
||||||
|
# constants
|
||||||
|
baseDir=$(cd `dirname "$0"`;pwd)
|
||||||
|
# functions
|
||||||
|
|
||||||
|
# main
|
||||||
|
[ -z "${BASH_SOURCE[0]}" -o "${BASH_SOURCE[0]}" = "$0" ] || return
|
||||||
|
cd $baseDir/../app
|
||||||
|
mvn package
|
131
cc-chatbot/app/pom.xml
Normal file
131
cc-chatbot/app/pom.xml
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>com.chatopera.chatbot</groupId>
|
||||||
|
<artifactId>sdk</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>sdk</name>
|
||||||
|
<description>Java SDK for Chatopera Conversational Engine.</description>
|
||||||
|
<url>https://www.chatopera.com</url>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-lang3</artifactId>
|
||||||
|
<version>3.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpclient</artifactId>
|
||||||
|
<version>4.3.6</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpasyncclient</artifactId>
|
||||||
|
<version>4.0.2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpmime</artifactId>
|
||||||
|
<version>4.3.6</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.code.gson</groupId>
|
||||||
|
<artifactId>gson</artifactId>
|
||||||
|
<version>2.8.1</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.mashape.unirest</groupId>
|
||||||
|
<artifactId>unirest-java</artifactId>
|
||||||
|
<version>1.4.9</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>3.8.1</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
|
<version>3.0.0</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-site-plugin</artifactId>
|
||||||
|
<version>3.7</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
<version>2.9</version>
|
||||||
|
</plugin>
|
||||||
|
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<version>3.0.2</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.7.0</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.20.1</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<version>3.0.2</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-install-plugin</artifactId>
|
||||||
|
<version>2.5.2</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<version>2.8.2</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
|
<distributionManagement>
|
||||||
|
<snapshotRepository>
|
||||||
|
<id>chatopera</id>
|
||||||
|
<url>http://192.168.2.217:8029/repository/maven-snapshots/</url>
|
||||||
|
</snapshotRepository>
|
||||||
|
</distributionManagement>
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>hain</id>
|
||||||
|
<name>Hai Liang Wang</name>
|
||||||
|
<email>hailiang.hl.wang@gmail.com</email>
|
||||||
|
<url>https://github.com/Samurais</url>
|
||||||
|
<organization>Chatopera Inc.</organization>
|
||||||
|
<organizationUrl>http://www.chatopera.com</organizationUrl>
|
||||||
|
<roles>
|
||||||
|
<role>architect</role>
|
||||||
|
<role>developer</role>
|
||||||
|
</roles>
|
||||||
|
<timezone>Asia/Shanghai</timezone>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
<reporting>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</reporting>
|
||||||
|
</project>
|
13
cc-chatbot/app/src/main/java/com/chatopera/chatbot/App.java
Normal file
13
cc-chatbot/app/src/main/java/com/chatopera/chatbot/App.java
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package com.chatopera.chatbot;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hello world!
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class App
|
||||||
|
{
|
||||||
|
public static void main( String[] args )
|
||||||
|
{
|
||||||
|
System.out.println( "Hello World!" );
|
||||||
|
}
|
||||||
|
}
|
26
cc-chatbot/app/src/site/site.xml
Normal file
26
cc-chatbot/app/src/site/site.xml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<project name="sdk" xmlns="http://maven.apache.org/DECORATION/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 http://maven.apache.org/xsd/decoration-1.8.0.xsd">
|
||||||
|
<bannerLeft>
|
||||||
|
<name>sdk</name>
|
||||||
|
<src>https://maven.apache.org/images/apache-maven-project.png</src>
|
||||||
|
<href>https://www.apache.org/</href>
|
||||||
|
</bannerLeft>
|
||||||
|
|
||||||
|
<bannerRight>
|
||||||
|
<src>https://maven.apache.org/images/maven-logo-black-on-white.png</src>
|
||||||
|
<href>https://maven.apache.org/</href>
|
||||||
|
</bannerRight>
|
||||||
|
|
||||||
|
<skin>
|
||||||
|
<groupId>org.apache.maven.skins</groupId>
|
||||||
|
<artifactId>maven-fluido-skin</artifactId>
|
||||||
|
<version>1.7</version>
|
||||||
|
</skin>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<menu ref="parent" />
|
||||||
|
<menu ref="reports" />
|
||||||
|
</body>
|
||||||
|
</project>
|
@ -0,0 +1,38 @@
|
|||||||
|
package com.chatopera.chatbot;
|
||||||
|
|
||||||
|
import junit.framework.Test;
|
||||||
|
import junit.framework.TestCase;
|
||||||
|
import junit.framework.TestSuite;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unit test for simple App.
|
||||||
|
*/
|
||||||
|
public class AppTest
|
||||||
|
extends TestCase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create the test case
|
||||||
|
*
|
||||||
|
* @param testName name of the test case
|
||||||
|
*/
|
||||||
|
public AppTest( String testName )
|
||||||
|
{
|
||||||
|
super( testName );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the suite of tests being tested
|
||||||
|
*/
|
||||||
|
public static Test suite()
|
||||||
|
{
|
||||||
|
return new TestSuite( AppTest.class );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rigourous Test :-)
|
||||||
|
*/
|
||||||
|
public void testApp()
|
||||||
|
{
|
||||||
|
assertTrue( true );
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user