consistency.genai.mjs•880 B
script({
model: "azure_serverless_models:AI21-Jamba-1-5-Large-etzun",
files: "docs/src/content/docs/reference/**/*.{md,mdx}",
title: "check consistency",
system: ["system.assistant", "system.annotations"],
})
const files = env.files
.slice()
.filter((f) => !!f.content && f.content.length < 30000) // avoid massive autogenerated files
.sort((l, r) => l.content.length - r.content.length) // for rendering purposes
console.log(
files
.map((file) => `${file.filename}: ${(file.content.length / 1e3) | 0}kb`)
.join("\n")
)
def("DOC", files)
$`
You are a technical documentation expert.
- Analyze the consistency, grammar, spell checking, writing quality of the content in DOC
- Analyze the consistency of all code snippets
- Report all issues using annotation format for all file. Be systematic and consistent in your analysis.
`