akvo-rag-js 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -24,11 +24,14 @@ npm install akvo-rag-js
24
24
  Example Usage:
25
25
 
26
26
  ```javascript
27
- import { initChat } from 'akvo-rag';
27
+ import { initChat } from 'akvo-rag-js';
28
28
  import 'akvo-rag-js/dist/akvo-rag.css';
29
29
 
30
- initChatbot({
30
+ initChat({
31
31
  title: 'Support Bot',
32
+ token: "<auth-token>",
33
+ kb_id: 39,
34
+ wsURL: "ws://localhost:81/ws/chat",
32
35
  });
33
36
 
34
37
  ```
@@ -53,6 +56,9 @@ initChatbot({
53
56
  <script>
54
57
  AkvoRAG.initChat({
55
58
  title: 'Support Bot',
59
+ token: "<auth-token>",
60
+ kb_id: 39,
61
+ wsURL: "ws://localhost:81/ws/chat",
56
62
  });
57
63
  </script>
58
64
 
@@ -60,16 +66,29 @@ initChatbot({
60
66
  </html>
61
67
  ```
62
68
 
63
- ## 🎨 Styling
69
+ ## ⚙️ `initChat` Parameters
64
70
 
65
- All styles are scoped under `#akvo-rag`. You can override CSS variables or extend the SCSS if needed.
71
+ The `initChat` function accepts a configuration object to customize the chat widget behavior:
66
72
 
67
- ## 🧱 Development
73
+ | Parameter | Type | Required | Description |
74
+ | --------- | -------- | -------- | -------------------------------------------------------- |
75
+ | `title` | `string` | ✅ Yes | The title displayed at the top of the chat window. |
76
+ | `token` | `string` | ✅ Yes | JWT or access token used for authenticating the user. |
77
+ | `kb_id` | `number` | ✅ Yes | The Knowledge Base ID to be used in the RAG backend. |
78
+ | `wsURL` | `string` | ✅ Yes | WebSocket endpoint URL for real-time chat communication. |
68
79
 
69
- To develop locally:
80
+ 💡 Additional configuration options may be added in future releases to support themes, positioning, or additional behaviors.
81
+
82
+ ## 🎨 Styling
83
+
84
+ All styles are scoped under `#akvo-rag`. You can override CSS variables or extend the SCSS if needed.
85
+
86
+ ## 🧱 Development
87
+
88
+ To develop locally:
70
89
 
71
90
  ```bash
72
- git clone https://github.com/akvo/akvo-rag-js.git
91
+ git clone https://github.com/akvo/akvo-rag-js.git
73
92
  cd akvo-rag-js
74
93
  npm install
75
94
  npm run dev
@@ -80,9 +99,9 @@ Build for production:
80
99
  npm run build
81
100
  ```
82
101
 
83
- ## 🤝 Contributing
102
+ ## 🤝 Contributing
84
103
 
85
- Contributions are welcome! Please open an issue or submit a PR.
104
+ Contributions are welcome! Please open an issue or submit a PR.
86
105
 
87
106
  ## 📄 License
88
107
  This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
package/package.json CHANGED
@@ -1,42 +1,51 @@
1
1
  {
2
- "name": "akvo-rag-js",
3
- "version": "1.0.5",
4
- "description": "An embeddable chatbot widget for Akvo RAG.",
5
- "main": "dist/index.cjs.js",
6
- "module": "dist/index.esm.js",
7
- "browser": "dist/akvo-rag.js",
8
- "files": ["dist"],
9
- "scripts": {
10
- "build": "webpack --mode production",
11
- "dev": "webpack serve",
12
- "publish": "npm publish --access public"
13
- },
14
- "repository": {
15
- "type": "git",
16
- "url": "git+https://github.com/akvo/akvo-rag-js.git"
17
- },
18
- "keywords": ["chatbot", "widget", "akvo", "rag"],
19
- "author": "Akvo",
20
- "license": "AGPL-3.0",
21
- "bugs": {
22
- "url": "https://github.com/akvo/akvo-rag-js/issues"
23
- },
24
- "homepage": "https://github.com/akvo/akvo-rag-js#readme",
25
- "devDependencies": {
26
- "@babel/core": "^7.27.1",
27
- "@babel/preset-env": "^7.27.2",
28
- "babel-loader": "^10.0.0",
29
- "css-loader": "^7.1.2",
30
- "html-webpack-plugin": "^5.6.3",
31
- "mini-css-extract-plugin": "^2.9.2",
32
- "sass": "^1.88.0",
33
- "sass-loader": "^16.0.5",
34
- "terser-webpack-plugin": "^5.3.14",
35
- "webpack": "^5.99.8",
36
- "webpack-cli": "^6.0.1",
37
- "webpack-dev-server": "^5.2.1"
38
- },
39
- "dependencies": {
40
- "font-awesome": "^4.7.0"
41
- }
2
+ "name": "akvo-rag-js",
3
+ "version": "1.0.7",
4
+ "description": "An embeddable chatbot widget for Akvo RAG.",
5
+ "main": "dist/index.cjs.js",
6
+ "module": "dist/index.esm.js",
7
+ "browser": "dist/akvo-rag.js",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "webpack --mode production",
13
+ "dev": "webpack serve",
14
+ "publish": "npm publish --access public"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/akvo/akvo-rag-js.git"
19
+ },
20
+ "keywords": [
21
+ "chatbot",
22
+ "widget",
23
+ "akvo",
24
+ "rag"
25
+ ],
26
+ "author": "Akvo",
27
+ "license": "AGPL-3.0",
28
+ "bugs": {
29
+ "url": "https://github.com/akvo/akvo-rag-js/issues"
30
+ },
31
+ "homepage": "https://github.com/akvo/akvo-rag-js#readme",
32
+ "devDependencies": {
33
+ "@babel/core": "^7.27.1",
34
+ "@babel/preset-env": "^7.27.2",
35
+ "babel-loader": "^10.0.0",
36
+ "css-loader": "^7.1.2",
37
+ "html-webpack-plugin": "^5.6.3",
38
+ "mini-css-extract-plugin": "^2.9.2",
39
+ "sass": "^1.88.0",
40
+ "sass-loader": "^16.0.5",
41
+ "terser-webpack-plugin": "^5.3.14",
42
+ "webpack": "^5.99.8",
43
+ "webpack-cli": "^6.0.1",
44
+ "webpack-dev-server": "^5.2.1"
45
+ },
46
+ "dependencies": {
47
+ "dompurify": "^3.2.5",
48
+ "font-awesome": "^4.7.0",
49
+ "marked": "^15.0.11"
50
+ }
42
51
  }
Binary file
Binary file
Binary file