Hi Gleb
1. https://issues.apache.org/jira/browse/NLPCRAFT-232 - ticket created
2. Do we need metadata for NCValue? We can add it, but could you
provide some example for such usecases (when element's metadata is not
enough)?
Regards,
Sergey
On 05.02.2021 19:12, Kamov Sergey wrote:
Hi, Gleb!
1. Is it possible/feasible to add parameter for /ask endpoint? For
example, if developers want to use some request metadata in their
probe, it would be useful for them to receive it from client. It
could be some dynamic characteristic of the user, which is used
differently, depending on the intent.
Look please at `ask` request `data` parameter.
rest -
https://app.swaggerhub.com/apis-docs/Apache-NLPCraft/apache-nlpcraft/0.7.4#/Asking/askSync
or
client -
https://nlpcraft.apache.org/apis/java-client/latest/org/apache/nlpcraft/client/NCClient.html#ask-java.lang.String-java.lang.String-java.lang.String-boolean-java.lang.Long-java.lang.String-)
data - optional JSON request parameter, is it enough for your case?
2. There is an interface NCValue, which could be implemented and
objects of the impl class are returned from NCValueLoader. But there
is no point in it being an interface, because developer can't use any
fields in child class. I think it'd be good, if original NCValue was
returned in NCTokenImpl, so developer can store some additional
loaded data there.
We already have metadata for
- model
(https://javadoc.io/static/org.apache.nlpcraft/nlpcraft/0.7.3/org/apache/nlpcraft/model/NCModelView.html#getMetadata())
and
- it's elements
(https://javadoc.io/static/org.apache.nlpcraft/nlpcraft/0.7.3/org/apache/nlpcraft/model/NCElement.html#getMetadata()).
You suggested to add metadata also to NCValue
(https://javadoc.io/doc/org.apache.nlpcraft/nlpcraft/latest/org/apache/nlpcraft/model/NCValue.html),
right?
For first look it seems reasonable, we have to discuss how it can be
used in intent DSL.
Regards,
Sergey
Any thoughts would be appreciated!
Thanks,
Gleb.