Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@squiz/chat-ui

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@squiz/chat-ui

## Overview This package provides an out of the box React Chat UI component to integrate with the Squiz DXP Chat AI capability.

  • 1.8.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

ChatUI

Overview

This package provides an out of the box React Chat UI component to integrate with the Squiz DXP Chat AI capability.

Styling

Out of the box this component includes classes, using the BEM class naming method, but does not load styles automatically. An example set of styling is provided in this packages lib directory.

Usage Example

When running in Squiz Matrix or another system where __dxp is routed correctly to the Squiz DXP

import { ChatUI } from '@squiz/chat-ui';

export function Chat = ()=>{
    return <ChatUI ai="CHAT_AI_SQUIZ_DXP_CONSOLE_HERE" greeting="Help can i help?" />
}

When running from a system without automatic routing via the origins /__dxp path a full path to the @squiz/ai-service needs to be provided:

import { ChatUI } from '@squiz/chat-ui';

export function Chat = ()=>{
    return (
        <ChatUI 
            ai="CHAT_AI_SQUIZ_DXP_CONSOLE_HERE"
            aiApiUrl="https://my-domain/__myRoute/to/the/dxp/service/ai" 
            greeting="Help can i help?" 
        />
    )
}

If you have a pre-existing DxpAiService from the @squiz/dxp-ai-client package you can pass this in instead of a aiApiUrl:

import { ChatUI } from '@squiz/chat-ui';
import { DxpAiService } from '@squiz/dxp-ai-client';

export function Chat = ({dxpAiService}: {dxpAiService: DxpAiService<unknown>})=>{
    return (
        <ChatUI 
            ai="CHAT_AI_SQUIZ_DXP_CONSOLE_HERE"
            aiService={dxpAiService} 
            greeting="Help can i help?" 
        />
    )
}

FAQs

Package last updated on 17 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc