@rahul_vendure/ai-chat-plugin 0.1.6 → 0.1.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 +17 -12
- package/package.json +1 -1
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:
|
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.7",
|
|
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",
|