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
1223454 unmodified lines10111213131415161718192020212223241 unmodified line26272828293031322 unmodified lines3536373738394041424143444546471 unmodified line49505149525354552 unmodified lines585960586162636413 unmodified lines787980787980818283845 unmodified lines909192929394959612 unmodified lines109110111111112113114115116117118119120121122123124125126127128129130131132133134135136137138139intents: benevolence: GIFTMINDER: view_events: utterances: - "I want to see events coming up"4 unmodified lines utterances: - "I want to buy gifts for my loved ones"
remembot: REMEMBOT: remember: utterances: - "I want to remember something" recall: utterances: - "I want to recall something" moneyshare: RESCUEBIDS: avoid_fee: utterances: - "I want to avoid a bank fee"1 unmodified line utterances: - "I need a small loan"
foodshare: FOODLINK: request_food: utterances: - "I'm hungry"2 unmodified lines utterances: - "I have food to share" - "I want to share some food" billpayshare:
BILLBRIDGE: request_bill_help: utterances: - "I need help with a bill" bloodshare:
BLOODSHARE: request_blood: utterances: - "I need blood"1 unmodified line utterances: - "I have blood to share"
math: MATH: compute_expression: utterances: - "compute xplusonesquared"2 unmodified lines - "Compute x squared plus one" - "Compute x plus one squared"
shopping_assistant: 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: BOT_STORE: add_package: utterances: - "I want to buy a package"5 unmodified lines aliases: - "I want to remove a package"
taskmaster_ai: TASKMASTERAI: add_task: utterances: - "I want to add a to do list item to my list"12 unmodified lines utterances: - "I want to remove items from my to do list"
flow_planner: 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*.log123345678991011121314151617181269 unmodified lines128812891290129112921293129412951296129712981299130013011302223 unmodified lines152615271528152915301531153215331534153515361537652 unmodified lines21902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221697 unmodified lines231423152316231723182319232023212322232323242325{ "name": "@botcierge/sdk", "version": "0.1.0", "version": "0.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@botcierge/sdk", "version": "0.1.0", "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",1223454 unmodified lines101112131314151614 unmodified lines31323334343536{ "name": "@botcierge/sdk", "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 --format cjs,esm --dts --clean", "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 lines67891011125 unmodified lines "strict": true, "declaration": true, "skipLibCheck": true, "types": ["node"], "esModuleInterop": true, "outDir": "dist" },123456789104#!/bin/bashset -e
uvicorn 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 noneuvicorn backend.main:app --host 0.0.0.0 --port 7860intents.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