包详细信息

@open-chat/search-widget

ah725570335UNLICENSED0.3.2

search widget now becomes pacakge.

openchat, open-chat, chat-powered-search, ai docs

自述文件

@openchat/search-widget

search widget now becomes pacakge.

Pros

  • Can be installed in any react application without the need to be embedded inside html itself.

  • Can be used inside our dashboard's workshop for easy customization.

Cons

  • more boilerplate code needed.

  • more build configurations.

How to use it

1- the embeded version (initilizeChatBot)

export type ColorsType = {
  dark: {
    primary: string;
    accent: string;
    background: string;
    foreground: string;
    backgroundLight: string;
  };
  light: {
    primary: string;
    accent: string;
    background: string;
    foreground: string;
    backgroundLight: string;
  };
};

type OptionsType = {
    colors?: ColorsType | undefined;
    mode?: ModeType | undefined;
    initialFirstMessage?: string | undefined;
    token: string;
}
const options:OptionsType = {
    colors: // optional defaults to the current colors if not provided
    mode: 'light'| "dark" // doesn't do any thing for now
}

initilizeChatBot(options) // call it after the document loaded.