@rahul_vendure/ai-chat-plugin 0.1.6 → 0.1.8
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/LICENSE +14 -0
- package/README.md +18 -13
- package/package.json +4 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Copyright (C) 2025 Rahul Yadav
|
|
2
|
+
|
|
3
|
+
This program is free software: you can redistribute it and/or modify
|
|
4
|
+
it under the terms of the GNU Affero General Public License as published by
|
|
5
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
6
|
+
(at your option) any later version.
|
|
7
|
+
|
|
8
|
+
This program is distributed in the hope that it will be useful,
|
|
9
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
+
GNU Affero General Public License for more details.
|
|
12
|
+
|
|
13
|
+
You should have received a copy of the GNU Affero General Public License
|
|
14
|
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
package/README.md
CHANGED
|
@@ -25,6 +25,17 @@ AI-powered shopping assistant plugin for [Vendure](https://www.vendure.io/) e-co
|
|
|
25
25
|
npm install @rahul_vendure/ai-chat-plugin
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
+
## Prerequisites
|
|
29
|
+
|
|
30
|
+
1. **Install pgvector** — The [pgvector](https://github.com/pgvector/pgvector) extension must be installed in your PostgreSQL instance. Enable it by running:
|
|
31
|
+
```sql
|
|
32
|
+
CREATE EXTENSION IF NOT EXISTS vector;
|
|
33
|
+
```
|
|
34
|
+
2. **Run migrations** — The plugin registers the entities with Vendure, but you must generate and run a database migration to create the tables and vector columns:
|
|
35
|
+
```bash
|
|
36
|
+
npx vendure migrate
|
|
37
|
+
```
|
|
38
|
+
|
|
28
39
|
## Setup
|
|
29
40
|
|
|
30
41
|
### 1. Add the plugin to your Vendure config
|
|
@@ -144,7 +155,7 @@ export const config: VendureConfig = {
|
|
|
144
155
|
|
|
145
156
|
## Tools
|
|
146
157
|
|
|
147
|
-
The AI assistant has
|
|
158
|
+
The AI assistant has 19 built-in tools:
|
|
148
159
|
|
|
149
160
|
| Tool | Description |
|
|
150
161
|
|------|-------------|
|
|
@@ -159,9 +170,14 @@ The AI assistant has 14 built-in tools:
|
|
|
159
170
|
| `trackOrder` | Get order status and tracking information |
|
|
160
171
|
| `getAvailableCountries` | List countries for shipping/billing |
|
|
161
172
|
| `getEligibleShippingMethods` | Get shipping options for active order |
|
|
173
|
+
| `getEligiblePaymentMethods` | Get available payment methods for active order |
|
|
162
174
|
| `setShippingAddress` | Set shipping address on active order |
|
|
163
175
|
| `setBillingAddress` | Set billing address on active order |
|
|
164
176
|
| `setShippingMethod` | Set shipping method on active order |
|
|
177
|
+
| `getAvailablePromotions` | List active promotions and deals (automatic + coupon-based) |
|
|
178
|
+
| `applyCouponCode` | Apply a coupon/promo code to the active order |
|
|
179
|
+
| `removeCouponCode` | Remove a coupon code from the active order |
|
|
180
|
+
| `getCartDiscounts` | View cart discounts and how close the customer is to qualifying for promotions |
|
|
165
181
|
|
|
166
182
|
## Entities
|
|
167
183
|
|
|
@@ -171,17 +187,6 @@ The plugin adds three entities to your database:
|
|
|
171
187
|
- `variant_embedding` — Vector embeddings for product variants
|
|
172
188
|
- `collection_embedding` — Vector embeddings for collections
|
|
173
189
|
|
|
174
|
-
**Prerequisites:**
|
|
175
|
-
|
|
176
|
-
1. **Install pgvector** — The [pgvector](https://github.com/pgvector/pgvector) extension must be installed in your PostgreSQL instance. Enable it by running:
|
|
177
|
-
```sql
|
|
178
|
-
CREATE EXTENSION IF NOT EXISTS vector;
|
|
179
|
-
```
|
|
180
|
-
2. **Run migrations** — The plugin registers the entities with Vendure, but you must generate and run a database migration to create the tables and vector columns:
|
|
181
|
-
```bash
|
|
182
|
-
npx vendure migrate
|
|
183
|
-
```
|
|
184
|
-
|
|
185
190
|
## Admin Dashboard AI Chat
|
|
186
191
|
|
|
187
192
|
The plugin also includes a built-in admin chat endpoint at `POST /admin-ai-chat/chat` with admin-specific tools:
|
|
@@ -220,4 +225,4 @@ import {
|
|
|
220
225
|
|
|
221
226
|
## License
|
|
222
227
|
|
|
223
|
-
|
|
228
|
+
AGPL-3.0 — see [LICENSE](./LICENSE) for details.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rahul_vendure/ai-chat-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "AI-powered shopping assistant plugin for Vendure — LLM chat, vector search, cart management, and order tracking",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
14
|
"dist",
|
|
15
|
-
"README.md"
|
|
15
|
+
"README.md",
|
|
16
|
+
"LICENSE"
|
|
16
17
|
],
|
|
17
18
|
"scripts": {
|
|
18
19
|
"build": "tsc",
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
"ecommerce"
|
|
33
34
|
],
|
|
34
35
|
"author": "Rahul Yadav",
|
|
35
|
-
"license": "
|
|
36
|
+
"license": "AGPL-3.0",
|
|
36
37
|
"publishConfig": {
|
|
37
38
|
"access": "public"
|
|
38
39
|
},
|