AI user chatbot

Certified Associate Developer

Hello,

I have built a chatbot in appian. I have two objects in my interface. First is a text box, which takes user question. And, the second is a button user clicks to send question to AI bot and get response.

Currently, when text box loses focus, a local variable called isProcessing is turned to true(So the user can be shown that processing is occurring). And, when the button-press returns with AI response, the isProcessing is turned to false, and the AI response is shown to user.

I want to have it so that when the text box loses focus, the local variable isProcessing is turned to true, as well as data being sent to AI bot. And, then when AI bot returns, the isProcessing is turned to false, and result shown.

Is this possible?

Thanks for your time.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I think this should work using a!asyncVariable. This way, you can declare a local variable and make it evaluation react on entering text, or pushing the button.

    Give it a try. It might need a bit of tinkering, but should work.

  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    Hi Stefan, thanks for the idea.  Here is what I ran into:

    I need two events to happen in following sequence:
    step 1: isProcessing is marked as true (allowing user to see a processing indicator on screen).
    step 2: AI skill is called (via processModel), which generates process variables that I am reading back into interface.

    aSyncVariable solution: I can get aSyncvariable to run, when isProcessing is updated, but for the value of the variable, it does not like me to run a process.  Is there another way to run a process using aSyncVariable as trigger?

  • 0
    Certified Associate Developer
    in reply to rohity0003

    Here is the best solution I've come up with so far:

    In User Input text box's saveInto Block:
    1. update isProcessing
    2. call processModel to call AI Skill (isSynchronous=false)
    2a. In 'onSuccess' block, read processId into a local variable.

    A separate sub-interface loads ( when isProcessing = true ).
    This has a local variable processingDone that checks every 30 seconds (refreshVariable) to see if the process is done ( using a process report).
    When processingDone = true, a link appears to 'Show Results'.
    - When clicked, this reads in the data that was calculated by the (AI Skill) process.

  • 0
    Certified Lead Developer
    in reply to rohity0003

    OK. I did not expect you are running a process. In my use cases I use separate LLM providers and simple integrations to make calls.

Reply Children
No Data