Spaces:
Runtime error
Runtime error
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 filesFiles changed (7)
- intents.yaml+38-13
- sdk-js/.gitignoreAdded+5
- sdk-js/package-lock.json+49-2
- sdk-js/package.json+4-3
- sdk-js/src/main.tsAdded+34
- sdk-js/tsconfig.json+1
- start.sh+1-7
123454 unmodified lines10111213141516171819202122231 unmodified line252627282930312 unmodified lines34353637383940414243441 unmodified line464748495051522 unmodified lines5556575859606113 unmodified lines7576777879808182835 unmodified lines8990919293949512 unmodified lines108109110111112113114intents:benevolence:view_events:utterances:- "I want to see events coming up"4 unmodified linesutterances:- "I want to buy gifts for my loved ones"remembot:remember:utterances:- "I want to remember something"recall:utterances:- "I want to recall something"moneyshare:avoid_fee:utterances:- "I want to avoid a bank fee"1 unmodified lineutterances:- "I need a small loan"foodshare:request_food:utterances:- "I'm hungry"2 unmodified linesutterances:- "I have food to share"- "I want to share some food"billpayshare:request_bill_help:utterances:- "I need help with a bill"bloodshare:request_blood:utterances:- "I need blood"1 unmodified lineutterances:- "I have blood to share"math:compute_expression:utterances:- "compute xplusonesquared"2 unmodified lines- "Compute x squared plus one"- "Compute x plus one squared"shopping_assistant:add_item:utterances:- "Add an item to my shopping list"13 unmodified lines- "I've purchased some items on my shopping list"- "I have purchased some items on my shopping list"bot_store:add_package:utterances:- "I want to buy a package"5 unmodified linesaliases:- "I want to remove a package"taskmaster_ai:add_task:utterances:- "I want to add a to do list item to my list"12 unmodified linesutterances:- "I want to remove items from my to do list"flow_planner:create_flow_plan:utterances:- "Create a flow plan for tomorrow"123454 unmodified lines1011121314151617181920212223241 unmodified line262728293031322 unmodified lines353637383940414243444546471 unmodified line495051525354552 unmodified lines5859606162636413 unmodified lines787980818283845 unmodified lines9091929394959612 unmodified lines109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139intents:GIFTMINDER:view_events:utterances:- "I want to see events coming up"4 unmodified linesutterances:- "I want to buy gifts for my loved ones"REMEMBOT:remember:utterances:- "I want to remember something"recall:utterances:- "I want to recall something"RESCUEBIDS:avoid_fee:utterances:- "I want to avoid a bank fee"1 unmodified lineutterances:- "I need a small loan"FOODLINK:request_food:utterances:- "I'm hungry"2 unmodified linesutterances:- "I have food to share"- "I want to share some food"BILLBRIDGE:request_bill_help:utterances:- "I need help with a bill"BLOODSHARE:request_blood:utterances:- "I need blood"1 unmodified lineutterances:- "I have blood to share"MATH:compute_expression:utterances:- "compute xplusonesquared"2 unmodified lines- "Compute x squared plus one"- "Compute x plus one squared"SHOP_SAVVY:add_item:utterances:- "Add an item to my shopping list"13 unmodified lines- "I've purchased some items on my shopping list"- "I have purchased some items on my shopping list"BOT_STORE:add_package:utterances:- "I want to buy a package"5 unmodified linesaliases:- "I want to remove a package"TASKMASTERAI:add_task:utterances:- "I want to add a to do list item to my list"12 unmodified linesutterances:- "I want to remove items from my to do list"FLOWPLANNER:create_flow_plan:utterances:- "Create a flow plan for tomorrow"CGM:find_company:utterances:- I need a company that...- I want a company that...TIFFANY:process_dental_patient:utterances:- I want to process the patient visit for <patient-name>CAREMEDIC:process_medical_patient:utterances:- I want to process the patient visit for <patient-name>DISCRETION:retrieval_augmented_generation:utterances:-
12345node_modulesdist.env.npmrc*.log123456789101112131269 unmodified lines128312841285128612871288223 unmodified lines151215131514151515161517652 unmodified lines21702171217221732174217597 unmodified lines227322742275227622772278{"name": "@botcierge/sdk","version": "0.1.0","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "@botcierge/sdk","version": "0.1.0","license": "MIT","devDependencies": {"@types/node": "^25.8.0","tsup": "^8.0.0",1269 unmodified lines"undici-types": ">=7.24.0 <7.24.7"}},"node_modules/@vitest/expect": {"version": "4.1.6","resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.6.tgz",223 unmodified lines"dev": true,"license": "MIT"},"node_modules/debug": {"version": "4.4.3","resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",652 unmodified lines}}},"node_modules/readdirp": {"version": "4.1.2","resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",97 unmodified lines"fsevents": "~2.3.2"}},"node_modules/siginfo": {"version": "2.0.0","resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",1234567891011121314151617181269 unmodified lines128812891290129112921293129412951296129712981299130013011302223 unmodified lines152615271528152915301531153215331534153515361537652 unmodified lines21902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221697 unmodified lines231423152316231723182319232023212322232323242325{"name": "@botcierge/sdk","version": "0.1.1","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "@botcierge/sdk","version": "0.1.1","license": "MIT","dependencies": {"@types/react": "^19.2.14","react": "^19.2.6","react-dom": "^19.2.6"},"devDependencies": {"@types/node": "^25.8.0","tsup": "^8.0.0",1269 unmodified lines"undici-types": ">=7.24.0 <7.24.7"}},"node_modules/@types/react": {"version": "19.2.14","resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz","integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==","license": "MIT","dependencies": {"csstype": "^3.2.2"}},"node_modules/@vitest/expect": {"version": "4.1.6","resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.6.tgz",223 unmodified lines"dev": true,"license": "MIT"},"node_modules/csstype": {"version": "3.2.3","resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz","integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==","license": "MIT"},"node_modules/debug": {"version": "4.4.3","resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",652 unmodified lines}}},"node_modules/react": {"version": "19.2.6","resolved": "https://registry.npmjs.org/react/-/react-19.2.6.tgz","integrity": "sha512-sfWGGfavi0xr8Pg0sVsyHMAOziVYKgPLNrS7ig+ivMNb3wbCBw3KxtflsGBAwD3gYQlE/AEZsTLgToRrSCjb0Q==","license": "MIT","engines": {"node": ">=0.10.0"}},"node_modules/react-dom": {"version": "19.2.6","resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.6.tgz","integrity": "sha512-0prMI+hvBbPjsWnxDLxlCGyM8PN6UuWjEUCYmZhO67xIV9Xasa/r/vDnq+Xyq4Lo27g8QSbO5YzARu0D1Sps3g==","license": "MIT","dependencies": {"scheduler": "^0.27.0"},"peerDependencies": {"react": "^19.2.6"}},"node_modules/readdirp": {"version": "4.1.2","resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",97 unmodified lines"fsevents": "~2.3.2"}},"node_modules/scheduler": {"version": "0.27.0","resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz","integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==","license": "MIT"},"node_modules/siginfo": {"version": "2.0.0","resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",
123454 unmodified lines1011121314151614 unmodified lines3132333435{"name": "@botcierge/sdk","version": "0.1.1","description": "SDK for Botcierge Intent Classification","type": "module",4 unmodified lines"dist"],"scripts": {"build": "tsup src/index.ts --format cjs,esm --dts --clean","dev": "tsup src/index.ts --format cjs,esm --watch --dts","test": "vitest run","lint": "tsc"14 unmodified lines"tsup": "^8.0.0","typescript": "^5.0.0","vitest": "^4.1.6"}}123454 unmodified lines1011121314151614 unmodified lines313233343536{"name": "@horribleprogram/sdk","version": "0.1.1","description": "SDK for Botcierge Intent Classification","type": "module",4 unmodified lines"dist"],"scripts": {"build": "tsup src/index.ts src/main.ts --format cjs,esm --dts --clean","dev": "tsup src/index.ts --format cjs,esm --watch --dts","test": "vitest run","lint": "tsc"14 unmodified lines"tsup": "^8.0.0","typescript": "^5.0.0","vitest": "^4.1.6"},"dependencies": {}}
12345678910111213141516171819202122232425262728293031323334import * as readline from 'readline';import { query_intent } from './index';
const queries = [ "I'm hungry", "I need some blood", "I want to add milk to my shopping list"];
async function runBatch() { for (const query of queries) { const result = await query_intent(query); console.log(result.intent); }}
async function runInteractive() { const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); const prompt = () => rl.question('> ', async (user_query: string) => { if (!user_query) { rl.close(); return; } const result = await query_intent(user_query); console.log(result.intent); prompt(); }); prompt();}
const mode = process.argv[2];if (mode === 'interactive') { runInteractive();} else { runBatch();}5 unmodified lines678910115 unmodified lines"strict": true,"declaration": true,"skipLibCheck": true,"esModuleInterop": true,"outDir": "dist"},5 unmodified lines67891011125 unmodified lines"strict": true,"declaration": true,"skipLibCheck": true,"types": ["node"],"esModuleInterop": true,"outDir": "dist"},
12345678910#!/bin/bashset -euvicorn backend.main:app --host 0.0.0.0 --port 8000 &streamlit run frontend/app.py \--server.port 7860 \--server.address 0.0.0.0 \--server.headless true \--server.fileWatcherType none1234#!/bin/bashset -euvicorn backend.main:app --host 0.0.0.0 --port 7860
intents.yaml+38-13
sdk-js/.gitignoreAdded+5
sdk-js/package-lock.json+49-2
sdk-js/package.json+4-3
sdk-js/src/main.tsAdded+34
sdk-js/tsconfig.json+1
start.sh+1-7