0

My utterance is What is happening in New York. While Training I have set New York as geo.SearchTerm and in action file, i have collected input as cityName and type is geo.NamedPoint. Now if I am asking what is happeningin Birlin, so it is giving me NamedPoint of Birlin but if I am saying "what is happening" without taking the city name so for the first time it is giving me location of Berlin and second time it is giving me the current location. What I wanted that if question is asked with location then give me the location details else no details at all. How to acheive that?

Here is my action file

action (EventSearch) {
  type(Search)
  collect{
    input (dateTimeExpression) {
     type (MyDateTimeExpression)
     min (Optional)
    }

   input (cityName) {
     type (geo.NamedPoint)
     min (Optional) max (One)
     default-select {
       with-rule {
         select-first
      }
    }
  }
}
output (EventConfirmationResult) 
}
Rahul Gupta
  • 972
  • 11
  • 29
  • Can you provide me with the code for your Action? It would help me to see how the inputs are being collected. – Ameya Feb 22 '19 at 17:52
  • 1
    I think, I have to make the concept transient and define a role to training exactly like date issue you answered earlier. – Rahul Gupta Feb 22 '19 at 18:06

1 Answers1

0

As you mentioned in your comment to my question, you would indeed need to create a wrapper similar to the DateTimeExpression structure described in the help center article for defining a transient structure.

I've also shown the relevant code below:

structure (CustomDateTimeExpression) {
  role-of (time.DateTimeExpression)
  description (wrapper for DateTimeExpression)
  features {
    transient
  }
}
Ameya
  • 880
  • 6
  • 13