Technology Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
merbinjanselm
Product and Topic Expert
Product and Topic Expert
2,416
Blog Series
Integrating AI with SAPUI5 Fiori Apps: Part 1 - Concept
Integrating AI with SAPUI5 Fiori Apps: Part 2 - Building a Text Summarizer
Integrating AI with SAPUI5 Fiori Apps: Part 3 - Building an AI Chatbot Assistant

In the previous blogs in the series, I explained the steps to integrate SAPUI5 Fiori Apps with LLM via Destinations and discussed a case of implementing a simple application - Text Summarizer.

Like the previous blog, I'm structuring this as a short walkthrough of building a slightly advanced use case of building an AI Chatbot Assistant with a conversational UI. The implementation is lean, implemented only on the client side with the entire conversation history retained within the web client, and gets reset once reloaded.

You can find the reference implementation here - GitHub - anselm94/blog-sap-fiori-genaihub-llm-integration 

Screengrab of AI Chatbot Assistant built in SAPUI5Screengrab of AI Chatbot Assistant built in SAPUI5

To build this, I reused the same implementation from the Text Summarizer blog and added a new tab to switch between the two sections, hence reusing the logic for the most part. 

There are two major differences between the Chatbot Assistant compared to the Text Summarizer implementation:

  1. Since LLMs don't remember your previous conversations, all the messages through the entire conversation history should be sent with every LLM request, to maintain the context.
  2. The Conversational UI is not available as an SAPUI5 control, I built this layout - containing altering User and AI messages with an Input control to enter your messages, using SAPUI5's FlexBox control with a bit of CSS styling.

The code is available under the open-source Apache license here -GitHub - anselm94/blog-sap-fiori-genaihub-llm-integration . Please feel free to modify it according to your needs.

If you have questions or feedback, please feel free to add a comment below. I'm all ears! 👂

5 Comments