上下文工程
基于Jev的Pi上下文压缩工具,保留重要指令和工具历史,去除冗余信息,支持优雅回退。
Jev-powered context compaction for Pi. Keep critical instructions and tool history, prune the noise, and fall back gracefully.
const response = await fetcher(options.endpoint ?? 'https://api.typesafe.ai/v1/systemone', {链接指向我们抓取当天的那个 commit,行号是准的。
下面是从这个项目源码里原样取出来的 question 组合。
取自 test/integration.test.ts:11
q是/否Keep this exact call and output?
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
q: { type: 'boolean', instructions: 'Keep this exact call and output?' },
},
});