Views
No views yet
extract_intent tool
when parsing a trip brief; otherwise the model just talks.| job | how it's invoked | output |
|---|---|---|
| Parse a trip brief → structured Intent | declare extract_intent tool | native tool-call with the Intent (region, bases+roles+nights, intermediates, certainty, when/duration, party, interests, constraints, asks) |
| Select day stops from a candidate pool | the selection prompt (no tool) | {interestId:[indices]} — the strongest few per interest |
| Converse (narrate the plan, confirm an edit, answer a question) | a chat/draft prompt (no tool fires) | grounded plain prose |
gatherCandidates over real towns).onnx-export → q4 ONNX (transformers.js layout).1import { pipeline, env } from '@huggingface/transformers';
2const gen = await pipeline('text-generation', '<this-repo>', { dtype: 'q4', device: 'webgpu' });
3// parse a brief — declare the tool:
4const out = await gen([{ role:'user', content: brief }], { tools: [EXTRACT_INTENT_TOOL], max_new_tokens: 400 });
5// converse — no tool declared:
6const reply = await gen([{ role:'user', content: draftPrompt }], { max_new_tokens: 300 });