AICornerModule
Installation
Section titled “Installation”npm install @sk-web-gui/reactAnvändning
Section titled “Användning”import { AICornerModule } from '@sk-web-gui/react';| Prop | Typ | Standard | Beskrivning |
|---|---|---|---|
sessionId | string | – | |
assistant | AssistantInfo | – | Current assistant |
assistants | Assistant[] | – | Avalable assistants |
questions | string[] | – | |
questionsTitle | string | – | |
sessionHistory | SessionHistory | – | |
readmore | InfoLink | – | |
onSendQuery | (query: string) => void | – | |
onChangeSession | (sessionId: string) => void | – | |
onSelectQuestion | (question: string) => void | – | |
showFeedback | boolean | – | @default true |
avatars | AIFeedAvatarMap | – | |
originTitles | OriginTitleMap | – | |
onChangeAssistant | (assistantId: string) => void | – | |
showNewSession | boolean | – | @default true |
docked | boolean | – | |
color | string | – | |
fullscreen | boolean | – | |
session | AssistantSession | – | |
disableFullscreen | boolean | – | @default false |
isMobile | boolean | – | |
showSessionHistory | boolean | – | @default true |
onOpen | () => void | – | |
onClose | () => void | – | |
onFullScreen | () => void | – | |
onCloseFullScreen | () => void | – | |
onNewSession | () => void | – | |
title | string | – | Title shown in header @default assistant.name |
subtitle | string | – | Subtitle shown in header when closed @default assistant.title |
Standardargs (från Meta.args)
Section titled “Standardargs (från Meta.args)”{ "readmore": { "url": "https://www.sundsvall.se/AI", "description": "Hur Sundsvalls kommun använder artificiell intelligens (AI): www.sundsvall.se/AI" }, "questionsTitle": "Vad kan jag hjälpa dig med?", "questions": [ "Vad är Querty?", "Jag har tappat bort mitt passerkort", "Vilka dagar jobbar vi halvdag" ]}Storyvarianter
Section titled “Storyvarianter”- Template – standardstory
- WithHistory – standardstory
- Implementation: @sk-web-gui/ai
- Storybook: AICornerModule