This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-519
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-519 by this push:
new a74f388c NCModelConfig fixes.
a74f388c is described below
commit a74f388ccfba5fd65a6583ae4a247c93e59eade9
Author: Sergey Kamov <[email protected]>
AuthorDate: Tue Nov 8 18:59:17 2022 +0400
NCModelConfig fixes.
---
.../scala/org/apache/nlpcraft/NCModelConfig.scala | 24 +++++++++++-----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCModelConfig.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCModelConfig.scala
index 40a844b8..b171dcfe 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/NCModelConfig.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/NCModelConfig.scala
@@ -19,7 +19,6 @@ package org.apache.nlpcraft
import java.time.Duration
-
/**
*
*/
@@ -28,34 +27,35 @@ object NCModelConfig:
val DFLT_CONV_DEPTH = 3
def apply(id: String, name: String, ver: String): NCModelConfig =
- new NCModelConfig ():
+ new NCPropertyMapAdapter with NCModelConfig:
override val getId: String = id
override val getName: String = name
override val getVersion: String = ver
def apply(id: String, name: String, ver: String, desc: String, orig:
String): NCModelConfig =
- new NCModelConfig() :
+ new NCPropertyMapAdapter with NCModelConfig :
override val getId: String = id
override val getName: String = name
override val getVersion: String = ver
override val getDescription: Option[String] = desc.?
override val getOrigin: Option[String] = orig.?
- def apply(id: String, name: String, ver: String, desc: String, orig:
String, convTimeout: Long, convDepth: Int): NCModelConfig = new NCModelConfig()
:
- override val getId: String = id
- override val getName: String = name
- override val getVersion: String = ver
- override val getDescription: Option[String] = desc.?
- override val getOrigin: Option[String] = orig.?
- override val getConversationTimeout: Long = convTimeout
- override val getConversationDepth: Int = convDepth
+ def apply(id: String, name: String, ver: String, desc: String, orig:
String, convTimeout: Long, convDepth: Int): NCModelConfig =
+ new NCPropertyMapAdapter with NCModelConfig :
+ override val getId: String = id
+ override val getName: String = name
+ override val getVersion: String = ver
+ override val getDescription: Option[String] = desc.?
+ override val getOrigin: Option[String] = orig.?
+ override val getConversationTimeout: Long = convTimeout
+ override val getConversationDepth: Int = convDepth
import org.apache.nlpcraft.NCModelConfig.*
/**
*
*/
-trait NCModelConfig extends NCPropertyMapAdapter:
+trait NCModelConfig extends NCPropertyMap:
def getId: String
def getName: String
def getVersion: String