[ 
https://issues.apache.org/jira/browse/NLPCRAFT-505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17561781#comment-17561781
 ] 

Sergey Kamov commented on NLPCRAFT-505:
---------------------------------------

1. NCResult yes, seems body: Any should be changed to body: Option[Any]

2. about NCResult#intentIf, it is not much ..

Model developer returns NCResult without any intentID  
       NCResult(
            s"Lights are [$status] in [${locations.toLowerCase}].",
            NCResultType.ASK_RESULT
        )

and later `intentID` is set  by the system. Should be refactored some way I 
guess

 

3. {color:#3c91e6}data{color}: 
{color:#9fd356}Map{color}{color:#b7baff}[{color}{color:#ecfc91}String{color}{color:#b7baff},
 Any]{color}  - Do you mean

{color:#0033b3}def {color}{color:#00627a}ask{color}{color:#3f9101}({color}txt: 
{color:#000000}String{color}, data: 
{color:#000000}Map{color}{color:#3f9101}[{color}{color:#000000}String{color}, 
AnyRef{color:#3f9101}]{color}, usrId: 
{color:#000000}String{color}{color:#3f9101}){color}: {color:#000000}NCResult ?
{color}

{color:#000000}Lets keep it as mandatory but add new one ask method{color}

{color:#3f9101}{color:#0033b3}def {color}{color:#00627a}ask{color}(txt: 
{color:#000000}String{color}, usrId: {color:#000000}String{color}): 
{color:#000000}NCResult ? (inside wecan  pass it as empty map)
{color}{color}

> Nullable arguments for API methods.
> -----------------------------------
>
>                 Key: NLPCRAFT-505
>                 URL: https://issues.apache.org/jira/browse/NLPCRAFT-505
>             Project: NLPCraft
>          Issue Type: Task
>          Components: Main API
>            Reporter: Sergey Kamov
>            Assignee: Sergey Kamov
>            Priority: Major
>             Fix For: 1.0.0
>
>
> Maybe better to have Option instead of nullable arguments of API methods  and 
> functions return type.
> Example: 
>  - org.apache.nlpcraft.NCModel#onRejection(org.apache.nlpcraft.NCIntentMatch 
> - nullable, e: NCRejection): NCResult  - nullable result



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to