Spartacus library to use CXII Assistant API.
CXAI Assistant library for use with CXAI assistant API
- Node version specified in
cxai-assistant-angular-lib/.npmrc
- Library depends on backend which allows access to part of API without authorization. Library assumes API is served via OCC, you need to modify code (
buildUrl
method) to allow arbitrary URL. - valid
configurationId
created by Assistant API. You can pass it viaprovideConfig
, or expose backend endpoint that returns it. See README for details.
- cd into workspace
cxai-assistant-angular-lib
nvm use
or use node version specified in.nvmrc
npm i
npm run build
to build the library. Look intobuild.sh
to build and publish to your npm repositoryYou must define environment variables with your npm repository credentials - see
.npmrc
file to see which variables are required- To connect the library with your application add it to
package.json
and follow README
- Run
npm link
in dist folder npm link @cx-spartacus/cxai-assistant
in your applicationYou need to have
"preserveSymlinks": true,
in app'sangular.json
projects/<project_name>/architect/build- Run the library using
npm run watch
- Run your app
ng s
This implementation opens chat session as soon as chat window is opened. It can be changed to open session only after user sends first message.
Create an issue in this repository if you find a bug or have questions about the content.
For additional support, ask a question in SAP Community.
If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses the standard DCO text of the Linux Foundation.
Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.