2.1.0 • Published 8 months ago

@petercatai/assistant v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 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

11 months ago

1.0.18

11 months ago

1.0.17

11 months ago

1.0.16

11 months ago

1.0.9

12 months ago

1.0.8

12 months ago

2.0.3

11 months ago

2.0.2

11 months ago

2.0.5

10 months ago

2.0.4

10 months ago

2.0.6

10 months ago

2.0.0-alpha.0

11 months ago

2.0.9

10 months ago

2.0.8

10 months ago

1.0.22

11 months ago

1.0.21

11 months ago

1.0.20

11 months ago

2.0.1

11 months ago

2.0.0

11 months ago

1.0.23

11 months ago

2.0.13-alpha.4

10 months ago

2.0.13-alpha.3

10 months ago

2.0.13-alpha.2

10 months ago

2.0.13-alpha.1

10 months ago

2.0.13-alpha.6

10 months ago

2.0.13-alpha.5

10 months ago

2.0.13-alpha.0

10 months ago

2.0.22-alpha.0

10 months ago

2.0.15

10 months ago

2.0.16

10 months ago

2.0.13

10 months ago

2.0.14

10 months ago

2.0.11

10 months ago

2.0.12

10 months ago

2.0.10

10 months ago

2.1.0

8 months ago

2.0.19

10 months ago

2.0.17

10 months ago

2.0.18

10 months ago

2.0.24

10 months ago

2.0.25

9 months ago

2.0.22

10 months ago

2.0.23

10 months ago

2.0.20

10 months ago

2.0.12-alpha.0

10 months ago

2.0.21

10 months ago

1.0.11

12 months ago

2.1.0-alpha.4

9 months ago

1.0.10

12 months ago

2.1.0-alpha.3

9 months ago

2.1.0-alpha.2

9 months ago

2.1.0-alpha.1

9 months ago

2.0.14-alpha.3

10 months ago

1.0.15

11 months ago

2.1.0-alpha.0

9 months ago

2.0.14-alpha.2

10 months ago

1.0.14

11 months ago

2.0.14-alpha.1

10 months ago

1.0.13

11 months ago

2.0.14-alpha.0

10 months ago

1.0.12

12 months 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