Skip to content

Building a Knowledge-Based Chatbot with OpenAI’s Assistants API and SAP Cloud Integration

License

Notifications You must be signed in to change notification settings

nesun3/openai-assistant-sap-integration

Repository files navigation

Open Source Love License: MIT GitHub

Knowledge-Based Chatbot

Description

Building a Knowledge-Based Chatbot with OpenAI’s Assistants API and SAP Cloud Integration.

Overview

This project showcases how to integrate OpenAI’s Assistants API with SAP Cloud Integration. While numerous codes and blogs on this subject predominantly use Python or Node.js, I aim to offer an alternative approach. As in my previous project, I strive to explore unconventional ways to harness the inherent capabilities of SAP Cloud Integration, pushing the boundaries of what can be achieved within this framework. With this goal in mind, I embark on the same journey once again.

In this project, I will guide you through the process of creating a Movie Expert assistant that can answer questions and provide recommendations based on a custom knowledge base from a movies_2023.txt file.

Please note that I have only built the complete backend API development, which can be consumed by any Frontend Framework like Vanilla JS, React, SAP UI5, SAP Build Apps, etc. to create the frontend chat interface. To demonstrate the frontend, I will use Postman and show all necessary APIs that can be consumed by Frontend Framework to create the frontend chat interface.

A write-up about this project can be found here: https://blogs.sap.com/2024/01/01/building-a-knowledge-based-chatbot-with-openais-assistants-api-and-sap-cloud-integration/

Important

You can use the prototype to create your own AI assistant capable of accepting user questions and providing responses based on the knowledge base of your document.

Solution Diagrams

Knowledge Retrieval Tool Flow Diagram

Requirements

  • You will need a SAP Cloud Integration tenant to consume, test and enhance this integration artifacts.
  • Postman to test the backend APIs.
  • OpenAI API Key from OpenAI account.

Download and Installation

This repository contains

  1. Integration Package - Download the Integration package named OpenAI Integration with SAP Cloud Integration.zip and import it to your tenant.
  2. Source Code - The unzip or raw file contents of each integration flows.
  3. Postman Collection- download the corresponding Zip file. Unzip and import the collections and environment.

Documentation

To learn how to use the integration artifacts, please refer to the blog for step by step guide.

Features

  • No Chunking, no embeddings, and no vector database are required.
  • Your own AI assistant capable of accepting user questions and providing responses based on the knowledge base of your document.

Limitations and Future Work

  • Refer to the OpenAI documentation to understand the limitations. Please note that these limitations are subject to change as the API is still in beta and OpenAI is actively working on adding more functionality. Therefore, be sure to keep up with the latest developments by exploring the Assistant API docs frequently.

How to obtain support

Create an issue in this repository if you find a bug or have questions about the content.

For additional support, ask a question in the Comment section.

License

See the LICENSE file for details.

🌱 Support the Project

Encourage this repo by giving it a star. If you like this concept, click on 'Star' [on the top right of the screen]. This is the GitHub equivalent of '👍 ' or 'like' or '+1'.

If you've found my work helpful in your project, please consider buying me a coffee to show your support!

Buy Me A Coffee


Coded with ❤️ from India 🇮🇳

About

Building a Knowledge-Based Chatbot with OpenAI’s Assistants API and SAP Cloud Integration

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages