Skip to content

Latest commit

 

History

History
56 lines (52 loc) · 1.54 KB

Other.md

File metadata and controls

56 lines (52 loc) · 1.54 KB

Capture Multiple Sentences

let querySentance = "";
let wordSlots = [
  "WordI",
  "WordII",
  "WordIII",
  "WordIV",
  "WordV",
  "WordVI",
  "WordVII",
  "WordVIII",
  "WordIX",
  "WordX",
  "WordXI",
  "WordXII",
  "WordXIII",
  "WordXIV",
  "WordXV",
  "WordXVI",
  "WordXVII",
  "WordXVIII",
  "WordIXX",
  "WordXX",
  "WordXXI",
  "WordXXII",
  "WordXXIII",
  "WordXXIV",
  "WordXXV",
  "WordXXVI",
  "WordXXVII",
  "WordXXVIII",
  "WordIXXX",
  "WordXXX",
];
wordSlots.forEach((word) => {
  let slot = this.event.request.intent.slots[word];
  if (
    slot !== undefined &&
    slot.value !== "" &&
    slot.value !== "?" &&
    slot.value !== null &&
    slot.value !== undefined
  ) {
    querySentance = querySentance + " " + slot.value;
  }
});

Can we use "AMAZON.SearchQuery" without using "search for" or "find out" phrase? Remove the requirement for a leading phrase with AMAZON.SearchQuery

Make sure that your skill uses no more than one AMAZON.SearchQuery slot per intent. The Amazon.SearchQuery slot type cannot be combined with another intent slot in sample utterances.

AMAZON.SearchQuery Reference