-
Notifications
You must be signed in to change notification settings - Fork 36
Home
SAP Conversational AI official SDK in Node.js
This module is a wrapper around the SAP Conversational AI API, and allows you to:
Install the package using npm, as shown below:
npm install --save sapcai
You can now use the SDK in your code. All you need is your bot's token. In case you have enabled our versioning feature in the settings of your bot, you can refer to our versioning documentation to learn how to select the appropriate token for you versions and environments.
Note: The train
API needs to be initialized with the bot version. If versioning is not enabled for the bot, the default v1
should be used. For more info see our documentation on versioning.
Using the entire SDK:
var sapcai = require('sapcai').default
var client = new sapcai('YOUR_TOKEN')
Extracting one single API:
var sapcai = require('sapcai').default
var request = new sapcai.request('YOUR_TOKEN')
Using the entire SDK:
import sapcai from 'sapcai'
const client = new sapcai('YOUR_TOKEN')
Extracting one single API:
import { request } from 'sapcai'
const requestClient = new request('YOUR_TOKEN')
You can view the whole API reference at cai.tools.sap/docs/api-reference.