Hi,
we're trying to chat with an LLM in a low code app through an interactive automation script. The idea is that there is a window where the user types a message and then a window where you see the history of the chat. The latter should support links, so it is html.
Whenever you type a new message, we want to prepend the entire history of the html conversation to that new message and send everything off to the LLM. This ensures the llm has context on what the conversation was about.
The response of the LLM should then be added to the history.
We wanted to check if this is a good way of implementing a chatbot in Low code apps? Does it seem feasible or are there better approaches?
Hi Dennis,
There are a few ways to handle this in Low-Code Apps, but here’s the approach I’d recommend:
- Use a grid component to display the chat history, backed by a table variable that tracks the full conversation.
- At the bottom, add a text input and a "Send" button for new prompts.
- When the button is clicked, the prompt gets added to the table (so it shows up in the UI), and a script runs in the background to fetch the response. Once that’s done, the result is also added to the table. This setup relies on a new feature introduced in DataMiner 10.5.9 (using the output of a script in an action). The button also clears the input field, ready for the next prompt.