AI SDK for SAP ABAP - Learning Series - Part 2: Companion Documentation
Welcome back to our AI SDK for SAP ABAP Learning Series! In Part 1, we discussed the initial setup steps.
In this article (Part 2 of learning series), we will delve into companion documentation website for AI SDK for SAP ABAP. In future articles, as we dive deeper into programming using AI SDK, we will use this documentation website. This website will be kept up to date with features and capabilities and is intended to be the main reference point for AI SDK for SAP ABAP.
Documentation Location
The documentation is located at: https://microsoft.github.io/aisdkforsapabap/ . The link is also available from README file in GitHub repository located here: https://github.com/microsoft/aisdkforsapabap
Using the Documentation
Click on the "Documentation" button featured prominently on the starting screen, or, on the top left of the page menu. This presents five main sections:
About AI SDK for SAP ABAP
This section provides an overview of AI SDK and briefly discusses the features. As new AI engines are supported, this page will be updated. The section "Use Cases", in future, will highlight creative and innovative use of AI SDK by the community.
AI Resource Setup
This section discusses steps to set up different AI engines. At this time, AI SDK supports only Azure Open AI. However, other AI engine support (eg: Open AI) are also planned soon.
This section will walk through how to set up the AI engine and get the required parameters to be used in AI SDK programming model. For now, this section features resource setup steps for Azure Open AI.
Installing the SDK
This section details how to install the SDK using ABAP Git, as well as do a smoke test through a first run. As more AI engine support is built, this section will be updated with relevant content specifically targeting them. For now, this section discusses smoke testing/first run for Azure Open AI.
Working With the SDK
This section provides a comprehensive guide for developers who want to use AI SDK to create and manage AI models and applications. You will learn how to initialize the SDK in ABAP, and how to use its core features, such as Models, Deployments, Files, Fine-Tunes and Completions.?
AI SDK offers ABAP Friendly data types that make it easy to integrate with existing ABAP code and data structures. You can find all the data types that are supported by the SDK in the section "Type Definitions". These data types are also referenced in each of the feature sections, so you can easily declare variables using them. Alternatively, you can use implicit declarations (DATA(<variable_name>) when you don't need to know the details of the data structure. This page will help you understand the structure and meaning of each field in the data types.
An example is shown below:
The documentation for each feature (eg: Deployment) provides details such as version support, operations, and more. You can also use the menu on the right side of the page to navigate directly to different sections within the page. This helps you find the information you need quickly.
For each operation, you can see a code snippet that shows the data type of the variables used for the operation. Right after the code snippet, there is a "Parameters and Exceptions" section that shows the parameters and the exceptions that you can handle with try...catch statements. If the parameters are complex structures or table types, you can click on a link to go directly to the type declarations.
The next section is "Response/Status Code" which tells you how to check the results of an operation programmatically. The "Name" column shows the numeric value that is returned in the "statuscode" variable. The "Structure Populated" column shows the other variables that contain the results of the operation.
领英推荐
At the end of the page, you can find the name of the demo program that illustrates how to use the feature. These programs are part of the SDK installation and are available on your SAP Application server if you installed the SDK using ABAP Git from the git repository. You can refer to these programs as examples while learning about the data types and operations of a feature.
NOTE: When you look at the demo programs in your application server, you will notice many BREAK-POINT statements. The intent is to separate each of the operations and pause the running program for developers to inspect and understand the inbound and outbound variables.
NOTE: The intent of demo program is to communicate the API use as clearly as possible. To this end, sub-optimal programming techniques may be used in the demo program code. As an example, many of the variables declared explicitly can be avoided using implicit declarations (DATA<variable_name>).
Enterprise Control
SAP is a software for enterprises that can use AI SDK to enhance its capabilities on AI integration for business processes with ABAP language. However, not all features of AI SDK should be accessible to everyone. Different organizations have different policies on who can use what feature of AI SDK. For example, some features which enables "setup" (eg: Deployments, Files, Fine-Tunes) may be limited to managers or leads, while others like "completions" may be available to all users.
To accommodate these varying policies, a flexible programming model with configuration is needed. This is what Enterprise Control offers.?
You can learn more about this important feature in the "Enterprise Control" section of the documentation.
Discussion and Issue Reporting
Discussion and Community
The AI SDK for SAP has attracted a lot of interest since its launch, but also some confusion due to the lack of clear documentation. We understand the importance of having a space for the community to interact, ask questions, give feedback, and support each other. For now, we are using the discussion feature on github for this purpose. However, we are open to exploring other platforms like Stack Overflow in the future if the community prefers.
At the top of the documentation site, a link is provided to the discussion's forum.
Issue reporting
"To err is human; to forgive, divine" - Alexander Pope
We strive to deliver high-quality code and documentation that is easy to use. However, we acknowledge that software and documentation bugs are inevitable. If you encounter any problem, please report it to us. You can find the "Issue Reporting" link at the top of the website.
Light and Dark Theme Support
You can choose between "light" and "dark" theme for the documentation website. To change the theme, click the button on the top right corner, near the "Github" link.
Conclusion
In this article, which is part of learning series of AI SDK, we discussed about the companion documentation. Being familiar with the documentation website, its features and use can be helpful during development/programming. The discussion forum can be an extremely useful resource to exchange ideas. In case any issues are identified, please open an Issue as well.
Hello Gopal, I am just stepping into the world of AI SDK for SAP your blogs are amazing.Just wanted to know is there a provision to retain the chat history in the SDK to have a seamless conversation with AI