This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch master-model
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/master-model by this push:
new 2829575 WIP.
2829575 is described below
commit 28295750ef4e205ea24249e7733894934d1a16c4
Author: Sergey Kamov <[email protected]>
AuthorDate: Thu Oct 7 19:06:53 2021 +0300
WIP.
---
.../src/main/scala/org/apache/nlpcraft/model/NCModel.java | 14 ++++++++------
.../scala/org/apache/nlpcraft/model/NCModelBehaviour.java | 8 +++++++-
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModel.java
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModel.java
index 24a855e..62bb62a 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModel.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModel.java
@@ -22,20 +22,22 @@ import java.util.Map;
import java.util.List;
public interface NCModel {
+ // 2 different configs.
+ NCModelConfig getModelConfig();
+ NCModelBehaviour getModelBehaviour();
+
+ // Lifecycle. TODO: I am not sure that we need them. Look at it after
Server API development.
void start();
void stop();
+ // All these methods can be repeated with samoe parameters by defaylt.
String ask(String txt, Map<String, Object> data, boolean enableLog, String
userId);
-
NCResult askSync(String txt, Map<String, Object> data, boolean enableLog,
String userId);
- void cancel(Set<String> srvReqIds, String userId);
-
List<NCResult> check(Set<String> srvReqIds, Integer maxRows, String
userId);
+ void cancel(Set<String> srvReqIds, String userId);
+
void clearConversation(String userId);
void clearDialog(String userId);
-
- NCModelConfig getModelConfig();
- NCModelBehaviour getModelBehaviour();
}
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModelBehaviour.java
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModelBehaviour.java
index 0eff5d0..7e4a01b 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModelBehaviour.java
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/NCModelBehaviour.java
@@ -25,7 +25,13 @@ import java.util.Map;
import java.util.Set;
public interface NCModelBehaviour {
- List<String> getIntentsDsl();
+ default List<String> getIntentsDsl() {
+ return null;
+ }
+
+ default Map<String, List<List<String>>> getIntentsDslSamples() {
+ return null;
+ }
default boolean onParsedVariant(NCVariant var) {
return true;