• Resolved cloudchan

    (@cloudchan)


    Dear?all,

    I can use mwai_ai_query( $query ) to modify a query before it’s made successfully.such as asking weather or today date …etc with no problem. But I want to ask my ChatBot to power on my light or power off my light for my SmartHome’s devices.

    How can I get the string of question (query) in my filter’s script ?

    What is the variable name of the query string in PHP in order that I can parse this string in my filter script to get the device name for my API to power on or power off the related device ?

    Thanks !

    Best Regards. Cloud Chan

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Val Meow

    (@valwa)

    Hey @cloudchan! ??

    I’m not sure what you mean by “string of questions”, but for the use case you’re describing (dynamically calling an API service for a chatbot), you should consider using Function Calling, which might be more suitable than filters. You can refer to this documentation to learn more about it. Thanks!

    • This reply was modified 2 months, 1 week ago by Val Meow.
    Thread Starter cloudchan

    (@cloudchan)

    Dear Val Meow,

    Thanks a lot for your reply ! And I shall study your above information.

    I meant that I hope to get the content of User’s Input inside the filter (my program) and then I process the query’s content by my program for doing some change and at last return the modified content to output for next processing. Remark: The query content is equal to the Input Content by user on the chatbot.

    Is it possible ?

    Best Regards. Cloud Chan

    • This reply was modified 2 months, 1 week ago by cloudchan.
    • This reply was modified 2 months, 1 week ago by cloudchan.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.