horriblecpp Claude Sonnet 4.6 commited on
Commit
8c43e1a
·
1 Parent(s): 48278ce

Host API on port 7860 for HuggingFace Spaces, rename SDK to @horribleprogram /sdk

Browse files
intents.yaml CHANGED
@@ -1,5 +1,5 @@
1
  intents:
2
- benevolence:
3
  view_events:
4
  utterances:
5
  - "I want to see events coming up"
@@ -10,14 +10,15 @@ intents:
10
  utterances:
11
  - "I want to buy gifts for my loved ones"
12
 
13
- remembot:
14
  remember:
15
  utterances:
16
  - "I want to remember something"
17
  recall:
18
  utterances:
19
  - "I want to recall something"
20
- moneyshare:
 
21
  avoid_fee:
22
  utterances:
23
  - "I want to avoid a bank fee"
@@ -25,7 +26,7 @@ intents:
25
  utterances:
26
  - "I need a small loan"
27
 
28
- foodshare:
29
  request_food:
30
  utterances:
31
  - "I'm hungry"
@@ -34,11 +35,13 @@ intents:
34
  utterances:
35
  - "I have food to share"
36
  - "I want to share some food"
37
- billpayshare:
 
38
  request_bill_help:
39
  utterances:
40
  - "I need help with a bill"
41
- bloodshare:
 
42
  request_blood:
43
  utterances:
44
  - "I need blood"
@@ -46,7 +49,7 @@ intents:
46
  utterances:
47
  - "I have blood to share"
48
 
49
- math:
50
  compute_expression:
51
  utterances:
52
  - "compute xplusonesquared"
@@ -55,7 +58,7 @@ intents:
55
  - "Compute x squared plus one"
56
  - "Compute x plus one squared"
57
 
58
- shopping_assistant:
59
  add_item:
60
  utterances:
61
  - "Add an item to my shopping list"
@@ -75,9 +78,7 @@ intents:
75
  - "I've purchased some items on my shopping list"
76
  - "I have purchased some items on my shopping list"
77
 
78
-
79
-
80
- bot_store:
81
  add_package:
82
  utterances:
83
  - "I want to buy a package"
@@ -89,7 +90,7 @@ intents:
89
  aliases:
90
  - "I want to remove a package"
91
 
92
- taskmaster_ai:
93
  add_task:
94
  utterances:
95
  - "I want to add a to do list item to my list"
@@ -108,7 +109,31 @@ intents:
108
  utterances:
109
  - "I want to remove items from my to do list"
110
 
111
- flow_planner:
112
  create_flow_plan:
113
  utterances:
114
  - "Create a flow plan for tomorrow"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  intents:
2
+ GIFTMINDER:
3
  view_events:
4
  utterances:
5
  - "I want to see events coming up"
 
10
  utterances:
11
  - "I want to buy gifts for my loved ones"
12
 
13
+ REMEMBOT:
14
  remember:
15
  utterances:
16
  - "I want to remember something"
17
  recall:
18
  utterances:
19
  - "I want to recall something"
20
+
21
+ RESCUEBIDS:
22
  avoid_fee:
23
  utterances:
24
  - "I want to avoid a bank fee"
 
26
  utterances:
27
  - "I need a small loan"
28
 
29
+ FOODLINK:
30
  request_food:
31
  utterances:
32
  - "I'm hungry"
 
35
  utterances:
36
  - "I have food to share"
37
  - "I want to share some food"
38
+
39
+ BILLBRIDGE:
40
  request_bill_help:
41
  utterances:
42
  - "I need help with a bill"
43
+
44
+ BLOODSHARE:
45
  request_blood:
46
  utterances:
47
  - "I need blood"
 
49
  utterances:
50
  - "I have blood to share"
51
 
52
+ MATH:
53
  compute_expression:
54
  utterances:
55
  - "compute xplusonesquared"
 
58
  - "Compute x squared plus one"
59
  - "Compute x plus one squared"
60
 
61
+ SHOP_SAVVY:
62
  add_item:
63
  utterances:
64
  - "Add an item to my shopping list"
 
78
  - "I've purchased some items on my shopping list"
79
  - "I have purchased some items on my shopping list"
80
 
81
+ BOT_STORE:
 
 
82
  add_package:
83
  utterances:
84
  - "I want to buy a package"
 
90
  aliases:
91
  - "I want to remove a package"
92
 
93
+ TASKMASTERAI:
94
  add_task:
95
  utterances:
96
  - "I want to add a to do list item to my list"
 
109
  utterances:
110
  - "I want to remove items from my to do list"
111
 
112
+ FLOWPLANNER:
113
  create_flow_plan:
114
  utterances:
115
  - "Create a flow plan for tomorrow"
116
+
117
+
118
+ CGM:
119
+ find_company:
120
+ utterances:
121
+ - I need a company that...
122
+ - I want a company that...
123
+
124
+
125
+
126
+ TIFFANY:
127
+ process_dental_patient:
128
+ utterances:
129
+ - I want to process the patient visit for <patient-name>
130
+
131
+ CAREMEDIC:
132
+ process_medical_patient:
133
+ utterances:
134
+ - I want to process the patient visit for <patient-name>
135
+
136
+ DISCRETION:
137
+ retrieval_augmented_generation:
138
+ utterances:
139
+ -
sdk-js/.gitignore ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ node_modules
2
+ dist
3
+ .env
4
+ .npmrc
5
+ *.log
sdk-js/package-lock.json CHANGED
@@ -1,13 +1,18 @@
1
  {
2
  "name": "@botcierge/sdk",
3
- "version": "0.1.0",
4
  "lockfileVersion": 3,
5
  "requires": true,
6
  "packages": {
7
  "": {
8
  "name": "@botcierge/sdk",
9
- "version": "0.1.0",
10
  "license": "MIT",
 
 
 
 
 
11
  "devDependencies": {
12
  "@types/node": "^25.8.0",
13
  "tsup": "^8.0.0",
@@ -1283,6 +1288,15 @@
1283
  "undici-types": ">=7.24.0 <7.24.7"
1284
  }
1285
  },
 
 
 
 
 
 
 
 
 
1286
  "node_modules/@vitest/expect": {
1287
  "version": "4.1.6",
1288
  "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.6.tgz",
@@ -1512,6 +1526,12 @@
1512
  "dev": true,
1513
  "license": "MIT"
1514
  },
 
 
 
 
 
 
1515
  "node_modules/debug": {
1516
  "version": "4.4.3",
1517
  "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
@@ -2170,6 +2190,27 @@
2170
  }
2171
  }
2172
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2173
  "node_modules/readdirp": {
2174
  "version": "4.1.2",
2175
  "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
@@ -2273,6 +2314,12 @@
2273
  "fsevents": "~2.3.2"
2274
  }
2275
  },
 
 
 
 
 
 
2276
  "node_modules/siginfo": {
2277
  "version": "2.0.0",
2278
  "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",
 
1
  {
2
  "name": "@botcierge/sdk",
3
+ "version": "0.1.1",
4
  "lockfileVersion": 3,
5
  "requires": true,
6
  "packages": {
7
  "": {
8
  "name": "@botcierge/sdk",
9
+ "version": "0.1.1",
10
  "license": "MIT",
11
+ "dependencies": {
12
+ "@types/react": "^19.2.14",
13
+ "react": "^19.2.6",
14
+ "react-dom": "^19.2.6"
15
+ },
16
  "devDependencies": {
17
  "@types/node": "^25.8.0",
18
  "tsup": "^8.0.0",
 
1288
  "undici-types": ">=7.24.0 <7.24.7"
1289
  }
1290
  },
1291
+ "node_modules/@types/react": {
1292
+ "version": "19.2.14",
1293
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz",
1294
+ "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==",
1295
+ "license": "MIT",
1296
+ "dependencies": {
1297
+ "csstype": "^3.2.2"
1298
+ }
1299
+ },
1300
  "node_modules/@vitest/expect": {
1301
  "version": "4.1.6",
1302
  "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.6.tgz",
 
1526
  "dev": true,
1527
  "license": "MIT"
1528
  },
1529
+ "node_modules/csstype": {
1530
+ "version": "3.2.3",
1531
+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
1532
+ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
1533
+ "license": "MIT"
1534
+ },
1535
  "node_modules/debug": {
1536
  "version": "4.4.3",
1537
  "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
 
2190
  }
2191
  }
2192
  },
2193
+ "node_modules/react": {
2194
+ "version": "19.2.6",
2195
+ "resolved": "https://registry.npmjs.org/react/-/react-19.2.6.tgz",
2196
+ "integrity": "sha512-sfWGGfavi0xr8Pg0sVsyHMAOziVYKgPLNrS7ig+ivMNb3wbCBw3KxtflsGBAwD3gYQlE/AEZsTLgToRrSCjb0Q==",
2197
+ "license": "MIT",
2198
+ "engines": {
2199
+ "node": ">=0.10.0"
2200
+ }
2201
+ },
2202
+ "node_modules/react-dom": {
2203
+ "version": "19.2.6",
2204
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.6.tgz",
2205
+ "integrity": "sha512-0prMI+hvBbPjsWnxDLxlCGyM8PN6UuWjEUCYmZhO67xIV9Xasa/r/vDnq+Xyq4Lo27g8QSbO5YzARu0D1Sps3g==",
2206
+ "license": "MIT",
2207
+ "dependencies": {
2208
+ "scheduler": "^0.27.0"
2209
+ },
2210
+ "peerDependencies": {
2211
+ "react": "^19.2.6"
2212
+ }
2213
+ },
2214
  "node_modules/readdirp": {
2215
  "version": "4.1.2",
2216
  "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
 
2314
  "fsevents": "~2.3.2"
2315
  }
2316
  },
2317
+ "node_modules/scheduler": {
2318
+ "version": "0.27.0",
2319
+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz",
2320
+ "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",
2321
+ "license": "MIT"
2322
+ },
2323
  "node_modules/siginfo": {
2324
  "version": "2.0.0",
2325
  "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",
sdk-js/package.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "name": "@botcierge/sdk",
3
  "version": "0.1.1",
4
  "description": "SDK for Botcierge Intent Classification",
5
  "type": "module",
@@ -10,7 +10,7 @@
10
  "dist"
11
  ],
12
  "scripts": {
13
- "build": "tsup src/index.ts --format cjs,esm --dts --clean",
14
  "dev": "tsup src/index.ts --format cjs,esm --watch --dts",
15
  "test": "vitest run",
16
  "lint": "tsc"
@@ -31,5 +31,6 @@
31
  "tsup": "^8.0.0",
32
  "typescript": "^5.0.0",
33
  "vitest": "^4.1.6"
34
- }
 
35
  }
 
1
  {
2
+ "name": "@horribleprogram/sdk",
3
  "version": "0.1.1",
4
  "description": "SDK for Botcierge Intent Classification",
5
  "type": "module",
 
10
  "dist"
11
  ],
12
  "scripts": {
13
+ "build": "tsup src/index.ts src/main.ts --format cjs,esm --dts --clean",
14
  "dev": "tsup src/index.ts --format cjs,esm --watch --dts",
15
  "test": "vitest run",
16
  "lint": "tsc"
 
31
  "tsup": "^8.0.0",
32
  "typescript": "^5.0.0",
33
  "vitest": "^4.1.6"
34
+ },
35
+ "dependencies": {}
36
  }
sdk-js/src/main.ts ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as readline from 'readline';
2
+ import { query_intent } from './index';
3
+
4
+
5
+ const queries = [
6
+ "I'm hungry",
7
+ "I need some blood",
8
+ "I want to add milk to my shopping list"
9
+ ];
10
+
11
+ async function runBatch() {
12
+ for (const query of queries) {
13
+ const result = await query_intent(query);
14
+ console.log(result.intent);
15
+ }
16
+ }
17
+
18
+ async function runInteractive() {
19
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
20
+ const prompt = () => rl.question('> ', async (user_query: string) => {
21
+ if (!user_query) { rl.close(); return; }
22
+ const result = await query_intent(user_query);
23
+ console.log(result.intent);
24
+ prompt();
25
+ });
26
+ prompt();
27
+ }
28
+
29
+ const mode = process.argv[2];
30
+ if (mode === 'interactive') {
31
+ runInteractive();
32
+ } else {
33
+ runBatch();
34
+ }
sdk-js/tsconfig.json CHANGED
@@ -6,6 +6,7 @@
6
  "strict": true,
7
  "declaration": true,
8
  "skipLibCheck": true,
 
9
  "esModuleInterop": true,
10
  "outDir": "dist"
11
  },
 
6
  "strict": true,
7
  "declaration": true,
8
  "skipLibCheck": true,
9
+ "types": ["node"],
10
  "esModuleInterop": true,
11
  "outDir": "dist"
12
  },
start.sh CHANGED
@@ -1,10 +1,4 @@
1
  #!/bin/bash
2
  set -e
3
 
4
- uvicorn backend.main:app --host 0.0.0.0 --port 8000 &
5
-
6
- streamlit run frontend/app.py \
7
- --server.port 7860 \
8
- --server.address 0.0.0.0 \
9
- --server.headless true \
10
- --server.fileWatcherType none
 
1
  #!/bin/bash
2
  set -e
3
 
4
+ uvicorn backend.main:app --host 0.0.0.0 --port 7860