Spaces:
Runtime error
Runtime error
Download sdk-js/examples/batch.ts from horribleProgram/IntentAPI: direct link, hf CLI and curl.
- Browser
- Download file 455 Bytes
-
https://huggingface.co/spaces/horribleProgram/IntentAPI/resolve/main/sdk-js/examples/batch.ts
- Command line
-
hf download hf://spaces/horribleProgram/IntentAPI/sdk-js/examples/batch.ts
-
curl -L -o batch.ts https://huggingface.co/spaces/horribleProgram/IntentAPI/resolve/main/sdk-js/examples/batch.ts
455 Bytes
| import { Botcierge } from "../src/index.ts"; | |
| const client = new Botcierge(); | |
| const utterances = [ | |
| "I'm hungry", | |
| "I want to remember something", | |
| "I want to buy a package", | |
| "Create a flow plan for tomorrow", | |
| ]; | |
| const results = await Promise.all(utterances.map(u => client.query_intent(u))); | |
| results.forEach((r, i) => { | |
| console.log(`"${utterances[i]}"`); | |
| console.log(` → ${r.domain} / ${r.intent} [${r.confidence}]`); | |
| console.log(); | |
| }); | |