Skip to content

Shopping Assistant is an Spartacus Component (SAP Composable Storefront) providing Chat UI for SAP CX AI Toolkit's Shopping Assistant APIs.

License

Notifications You must be signed in to change notification settings

SAP-samples/cxii-shopping-assistant-ui-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

SAP CX Assistant Chat UI Component

Spartacus library to use CXII Assistant API. REUSE status

Description

CXAI Assistant library for use with CXAI assistant API

Requirements

  1. Node version specified in cxai-assistant-angular-lib/.npmrc
  2. 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.
  3. valid configurationId created by Assistant API. You can pass it via provideConfig, or expose backend endpoint that returns it. See README for details.

Download and Installation

Build library

  1. cd into workspace cxai-assistant-angular-lib
  2. nvm use or use node version specified in .nvmrc
  3. npm i
  4. npm run build to build the library. Look into build.sh to build and publish to your npm repository

    You must define environment variables with your npm repository credentials - see .npmrc file to see which variables are required

  5. To connect the library with your application add it to package.json and follow README

Run in development mode

  1. Run npm link in dist folder
  2. npm link @cx-spartacus/cxai-assistant in your application

    You need to have "preserveSymlinks": true, in app's angular.json projects/<project_name>/architect/build

  3. Run the library using npm run watch
  4. Run your app ng s

Known Issues

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.

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 SAP Community.

Contributing

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.

License

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.

About

Shopping Assistant is an Spartacus Component (SAP Composable Storefront) providing Chat UI for SAP CX AI Toolkit's Shopping Assistant APIs.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •