XataX
Xata8mo ago
3 replies
alihammad

ask ai

Hi, I have a bug with my code, when I add
sessionId
to the options, I receive error (invalid key [rules] in request).

It works when I remove
rules 
and
searchType


  const ask = await xata.db.docs.ask(
    // Pass in a simple question
    message,
    {
      sessionId: phone,
      rules,
      searchType: "keyword",
      search: {
        fuzziness: 2,
        prefix: "phrase",
      },
    }
  );


Note: I use Xata SDK for Node.js
Was this page helpful?