浏览器与电脑操作
通过 TypeSafe 的 Jev 实现网页浏览器自动化操作。
Trying automation on web browser via jev from typesafe
import { type ChoiceCriteria, type Questions, type SystemOneResult, TypeSafeClient, choice, noul } from "@typesafe-ai/sdk";链接指向我们抓取当天的那个 commit,行号是准的。
下面是从这个项目源码里原样取出来的 question 组合。
risky是/否Would carrying out this command do something hard to undo?
submit_after_typing是/否After the text is typed, does the user want it submitted right away (press enter / run the search)?
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
risky: { type: 'boolean', instructions: 'Would carrying out this command do something hard to undo?' },
submit_after_typing: { type: 'boolean', instructions: 'After the text is typed, does the user want it submitted right away (press enter / run the search)?' },
},
});