Applications
English full-duplex voice control for macOS with OpenAI Realtime, native Accessibility, and Jev.
export const TYPESAFE_ENDPOINT = "https://api.typesafe.ai/v1/systemone";The link points at the commit we read, so the line number still holds.
These question sets are lifted from this project's source exactly as written.
from src/constants.js:200
intenttrue/falseWhich browser action does the user ask for in `transcript`?
targettrue/falseWhich element in `elements` is the one the user refers to in `transcript` (the thing to click, type into or select)? Each line of `elements` starts with the element id (e.g. e07), then its role and visible text; the options are those ids.
sitetrue/falseWhich website or search engine does the user name in `transcript`?
completetrue/falseHas the user finished saying the command in `transcript`, so it can be executed now without waiting for more words?
is_commandtrue/falseIs `transcript` an instruction addressed to a web browser (navigate, search, click, type, scroll, tabs, confirm/cancel)?
destructivetrue/falseWould carrying out the action in `transcript` on this `page` submit a form, place an order, pay, delete, send a message, post publicly, log out, or otherwise do something hard to undo?
scroll_amountscoreHow far does the user want to scroll according to `transcript`?
0 — A little: a few lines (a bit, slightly, a little)1 — One screen / one page, or no amount specified2 — All the way to the end: the very top or the very bottomtext_spantrue/falseWhich option is exactly the text the user wants typed or searched, as spoken in `transcript`? Options are verbatim candidate spans.
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
intent: { type: 'boolean', instructions: 'Which browser action does the user ask for in `transcript`?' },
target: { type: 'boolean', instructions: 'Which element in `elements` is the one the user refers to in `transcript` (the thing to click, type into or select)? Each line of `elements` starts with the element id (e.g. e07), then its role and visible text; the options are those ids.' },
site: { type: 'boolean', instructions: 'Which website or search engine does the user name in `transcript`?' },
complete: { type: 'boolean', instructions: 'Has the user finished saying the command in `transcript`, so it can be executed now without waiting for more words?' },
is_command: { type: 'boolean', instructions: 'Is `transcript` an instruction addressed to a web browser (navigate, search, click, type, scroll, tabs, confirm/cancel)?' },
destructive: { type: 'boolean', instructions: 'Would carrying out the action in `transcript` on this `page` submit a form, place an order, pay, delete, send a message, post publicly, log out, or otherwise do something hard to undo?' },
scroll_amount: { type: 'score', instructions: 'How far does the user want to scroll according to `transcript`?',
criteria: ['A little: a few lines (a bit, slightly, a little)', 'One screen / one page, or no amount specified', 'All the way to the end: the very top or the very bottom'] },
text_span: { type: 'boolean', instructions: 'Which option is exactly the text the user wants typed or searched, as spoken in `transcript`? Options are verbatim candidate spans.' },
},
});