2.1.0 • Published 11 months ago

@petercatai/assistant v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@petercat/chat-app

npm Version

chat-app is a UI component library based on dumi, designed for building PeterCat conversation interfaces.

Development

# install dependencies
$ yarn install

# develop library by docs demo
$ yarn start

# build library source code
$ yarn run build

# build library source code in watch mode
$ yarn run build:watch

# build docs
$ yarn run docs:build

# check your project for potential problems
$ yarn run doctor

How to integrate Perter Cat Assistant by UMD way?

Step 1, externalize the following dependencies for your project if you already used them in your project:

// example for umi project
// .umirc.ts
export default {
  externals: {
    react: 'React',
    'react-dom': 'ReactDOM',
    antd: 'antd',
    dayjs: 'dayjs',
    'lottie-web': 'lottie',
  },
};

Step 2, add the following script tag to your entry HTML file:

...
<head>
+ <script src="https://example.cdn.com/react/umd/react.development.js"></script>
+ <script src="https://example.cdn.com/react-dom/umd/react-dom.development.js"></script>
+ <script src="https://example.cdn.com/dayjs/dayjs.min.js"></script>
+ <script src="https://example.cdn.com/antd/dist/antd.js"></script>
+ <script src="https://example.cdn.com/lottie-web/build/player/lottie.js"></script>
+ <script src="https://example.cdn.com/petercat-lui/dist/umd/petercat-lui.min.js"></script>
+ <link rel="stylesheet" href="https://example.cdn.com/petercat-lui/dist/umd/petercat-lui.min.css">
</head>
...

Step 3, render Assistant component in your project:

<body>
  ...
+  <script>
+    PetercatLUI.initAssistant({
+      apiDomain: 'https://api.petercat.ai',
+      token: 'your-token'
+    });
+ </script>
</body>

That's it! Now you can enjoy the Assistant component in your project.

LICENSE

MIT

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.6

1 year ago

2.0.0-alpha.0

1 year ago

2.0.9

1 year ago

2.0.8

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.23

1 year ago

2.0.13-alpha.4

1 year ago

2.0.13-alpha.3

1 year ago

2.0.13-alpha.2

1 year ago

2.0.13-alpha.1

1 year ago

2.0.13-alpha.6

1 year ago

2.0.13-alpha.5

1 year ago

2.0.13-alpha.0

1 year ago

2.0.22-alpha.0

1 year ago

2.0.15

1 year ago

2.0.16

1 year ago

2.0.13

1 year ago

2.0.14

1 year ago

2.0.11

1 year ago

2.0.12

1 year ago

2.0.10

1 year ago

2.1.0

11 months ago

2.0.19

1 year ago

2.0.17

1 year ago

2.0.18

1 year ago

2.0.24

1 year ago

2.0.25

12 months ago

2.0.22

1 year ago

2.0.23

1 year ago

2.0.20

1 year ago

2.0.12-alpha.0

1 year ago

2.0.21

1 year ago

1.0.11

1 year ago

2.1.0-alpha.4

12 months ago

1.0.10

1 year ago

2.1.0-alpha.3

12 months ago

2.1.0-alpha.2

12 months ago

2.1.0-alpha.1

12 months ago

2.0.14-alpha.3

1 year ago

1.0.15

1 year ago

2.1.0-alpha.0

12 months ago

2.0.14-alpha.2

1 year ago

1.0.14

1 year ago

2.0.14-alpha.1

1 year ago

1.0.13

1 year ago

2.0.14-alpha.0

1 year ago

1.0.12

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago