Package com.chatopera.bot.sdk
Class TrainMgr
java.lang.Object
com.chatopera.bot.sdk.TrainMgr
训练管理
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet Chatbot Statusvoid
trainAll()
Start in parallel, train all domainsprotected boolean
训练多轮对话脚本protected boolean
训练知识库,该任务提交成功后,异步执行。protected boolean
训练意图识别,返回提交结果,该任务提交成功后,异步执行。void
等待训练任务结束
-
Constructor Details
-
TrainMgr
public TrainMgr(String clientId, String clientSecret, String baseUrl) throws MalformedURLException, ChatbotException, MalformedURLException, ChatbotException -
TrainMgr
public TrainMgr(String clientId, String clientSecret) throws MalformedURLException, ChatbotException
-
-
Method Details
-
getStatus
Get Chatbot Status- Returns:
- Throws:
ChatbotException
ResourceInvalidException
-
trainConversations
训练多轮对话脚本- Returns:
- Throws:
ChatbotException
ResourceInvalidException
-
trainIntents
protected boolean trainIntents() throws ChatbotException, ResourceInvalidException, ResourceOperationException训练意图识别,返回提交结果,该任务提交成功后,异步执行。- Returns:
- true: 开始执行训练(此时服务器在执行任务,训练时间取决于数据量);false:不能正常执行训练
- Throws:
ChatbotException
ResourceInvalidException
ResourceOperationException
-
trainFAQs
训练知识库,该任务提交成功后,异步执行。- Returns:
- 训练任务是否启动。
- Throws:
ResourceInvalidException
ChatbotException
-
trainAll
public void trainAll()Start in parallel, train all domains -
waitForJobsDone
public void waitForJobsDone() throws InterruptedException, ResourceInvalidException, ChatbotException等待训练任务结束
-