[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-microsoft--genaiscript":3,"tool-microsoft--genaiscript":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":10,"last_commit_at":50,"category_tags":51,"status":17},4292,"Deep-Live-Cam","hacksider\u002FDeep-Live-Cam","Deep-Live-Cam 是一款专注于实时换脸与视频生成的开源工具，用户仅需一张静态照片，即可通过“一键操作”实现摄像头画面的即时变脸或制作深度伪造视频。它有效解决了传统换脸技术流程繁琐、对硬件配置要求极高以及难以实时预览的痛点，让高质量的数字内容创作变得触手可及。\n\n这款工具不仅适合开发者和技术研究人员探索算法边界，更因其极简的操作逻辑（仅需三步：选脸、选摄像头、启动），广泛适用于普通用户、内容创作者、设计师及直播主播。无论是为了动画角色定制、服装展示模特替换，还是制作趣味短视频和直播互动，Deep-Live-Cam 都能提供流畅的支持。\n\n其核心技术亮点在于强大的实时处理能力，支持口型遮罩（Mouth Mask）以保留使用者原始的嘴部动作，确保表情自然精准；同时具备“人脸映射”功能，可同时对画面中的多个主体应用不同面孔。此外，项目内置了严格的内容安全过滤机制，自动拦截涉及裸露、暴力等不当素材，并倡导用户在获得授权及明确标注的前提下合规使用，体现了技术发展与伦理责任的平衡。",88924,"2026-04-06T03:28:53",[14,15,13,52],"视频",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[14,35],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":77,"owner_twitter":78,"owner_website":79,"owner_url":80,"languages":81,"stars":120,"forks":121,"last_commit_at":122,"license":123,"difficulty_score":32,"env_os":124,"env_gpu":125,"env_ram":124,"env_deps":126,"category_tags":136,"github_topics":138,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":156,"updated_at":157,"faqs":158,"releases":189},4328,"microsoft\u002Fgenaiscript","genaiscript","Automatable GenAI Scripting","GenAIScript 是一款让开发者能用 JavaScript 代码“编写”提示词（Prompt）的开源工具。它核心理念是“提示即编程”，旨在解决传统手动编写提示词难以复用、缺乏版本控制且无法灵活处理复杂数据的问题。通过 GenAIScript，用户可以像编写普通程序一样，将文件读取、数据处理、逻辑判断与大模型调用无缝结合，轻松实现自动化工作流。\n\n这款工具特别适合熟悉 JavaScript 或 TypeScript 的开发者、工程师及技术研究人员使用。如果你希望将大模型能力集成到现有代码项目中，或者需要批量处理 PDF、DOCX 等文档并提取结构化数据，GenAIScript 能提供极大便利。其独特亮点在于内置了强大的数据模式（Schema）支持（兼容 Zod），可自动验证和修复大模型输出的数据格式；同时提供深度的 Visual Studio Code 集成，支持断点调试与测试，让开发体验如同编写传统软件般流畅。此外，它还原生支持 GitHub Copilot、OpenAI、Azure 及 Anthropic 等多种主流模型服务，帮助用户高效构建可维护、可共享的智能脚本。","![A yellow square with the word \"gen\" in lowercase black letters above the uppercase black letters \"AI.\"](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_genaiscript_readme_15ecb63bd203.png)\n\n# GenAIScript\n\n## Prompting is Coding\n\nProgrammatically assemble prompts for LLMs using JavaScript. Orchestrate LLMs, tools, and data in code.\n\n- JavaScript toolbox to work with prompts\n- Abstraction to make it easy and productive\n- Seamless Visual Studio Code integration or flexible command line\n- Built-in support for GitHub Copilot and GitHub Models, OpenAI, Azure OpenAI, Anthropic, and more\n\n- 📄 **Read the ONLINE DOCUMENTATION at [microsoft.github.io\u002Fgenaiscript](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002F)**\n- 💬 Join the [Discord server](https:\u002F\u002Fdiscord.gg\u002Fy7HpumjHeB)\n- 📝 Read the [blog](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fblog\u002F) for the latest news\n- 📺 Watch [Mr. Maeda's Cozy AI Kitchen](https:\u002F\u002Fyoutu.be\u002FajEbAm6kjI4)\n- 🤖 Agents - read the [llms-full.txt](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fllms-full.txt)\n\n---\n\n## Hello world\n\nSay to you want to create an LLM script that generates a 'hello world' poem. You can write the following script:\n\n```js\n$`Write a 'hello world' poem.`\n```\n\nThe `$` function is a template tag that creates a prompt. The prompt is then sent to the LLM (you configured), which generates the poem.\n\nLet's make it more interesting by adding files, data and structured output. Say you want to include a file in the prompt, and then save the output in a file. You can write the following script:\n\n```js\n\u002F\u002F read files\nconst file = await workspace.readText(\"data.txt\")\n\u002F\u002F include the file content in the prompt in a context-friendly way\ndef(\"DATA\", file)\n\u002F\u002F the task\n$`Analyze DATA and extract data in JSON in data.json.`\n```\n\nThe `def` function includes the content of the file, and optimizes it if necessary for the target LLM. GenAIScript script also parses the LLM output\nand will extract the `data.json` file automatically.\n\n---\n\n## 🚀 Quickstart Guide\n\nGet started quickly by installing the [Visual Studio Code Extension](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fgetting-started\u002Finstallation\u002F) or using the [command line](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fgetting-started\u002Finstallation).\n\n---\n\n## ✨ Features\n\n### 🎨 Stylized JavaScript & TypeScript\n\nBuild prompts programmatically using [JavaScript](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002F) or [TypeScript](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Ftypescript).\n\n```js\ndef(\"FILE\", env.files, { endsWith: \".pdf\" })\n$`Summarize FILE. Today is ${new Date()}.`\n```\n\n---\n\n### 🚀 Fast Development Loop\n\nEdit, [Debug](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fgetting-started\u002Fdebugging-scripts\u002F), [Run](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fgetting-started\u002Frunning-scripts\u002F), and [Test](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fgetting-started\u002Ftesting-scripts\u002F) your scripts in [Visual Studio Code](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fgetting-started\u002Finstallation) or with the [command line](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fgetting-started\u002Finstallation).\n\n---\n\n### 🔗 Reuse and Share Scripts\n\nScripts are [files](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002F)! They can be versioned, shared, and forked.\n\n```js\n\u002F\u002F define the context\ndef(\"FILE\", env.files, { endsWith: \".pdf\" })\n\u002F\u002F structure the data\nconst schema = defSchema(\"DATA\", { type: \"array\", items: { type: \"string\" } })\n\u002F\u002F assign the task\n$`Analyze FILE and extract data to JSON using the ${schema} schema.`\n```\n\n---\n\n### 📋 Data Schemas\n\nDefine, validate, and repair data using [schemas](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fschemas). Zod support builtin.\n\n```js\nconst data = defSchema(\"MY_DATA\", { type: \"array\", items: { ... } })\n$`Extract data from files using ${data} schema.`\n```\n\n---\n\n### 📄 Ingest Text from PDFs, DOCX, ...\n\nManipulate [PDFs](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fpdf), [DOCX](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fdocx), ...\n\n```js\ndef(\"PDF\", env.files, { endsWith: \".pdf\" })\nconst { pages } = await parsers.PDF(env.files[0])\n```\n\n---\n\n### 📊 Ingest Tables from CSV, XLSX, ...\n\nManipulate tabular data from [CSV](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fcsv), [XLSX](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fxlsx), ...\n\n```js\ndef(\"DATA\", env.files, { endsWith: \".csv\", sliceHead: 100 })\nconst rows = await parsers.CSV(env.files[0])\ndefData(\"ROWS\", rows, { sliceHead: 100 })\n```\n\n---\n\n### 📝 Generate Files\n\nExtract files and diff from the LLM output. Preview changes in Refactoring UI.\n\n```js\n$`Save the result in poem.txt.`\n```\n\n```txt\nFILE .\u002Fpoem.txt\nThe quick brown fox jumps over the lazy dog.\n```\n\n---\n\n### 🔍 File Search\n\nGrep or fuzz search [files](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Ffiles).\n\n```js\nconst { files } = await workspace.grep(\u002F[a-z][a-z0-9]+\u002F, { globs: \"*.md\" })\n```\n\n---\n\n## Classify\n\nClassify text, images or a mix of all.\n\n```js\nconst joke = await classify(\n    \"Why did the chicken cross the road? To fry in the sun.\",\n    {\n        yes: \"funny\",\n        no: \"not funny\",\n    }\n)\n```\n\n### LLM Tools\n\nRegister JavaScript functions as [tools](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Ftools)\n(with fallback for models that don't support tools). [Model Context Protocol (MCP) tools](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fmcp-tools) are also supported.\n\n```js\ndefTool(\n    \"weather\",\n    \"query a weather web api\",\n    { location: \"string\" },\n    async (args) =>\n        await fetch(`https:\u002F\u002Fweather.api.api\u002F?location=${args.location}`)\n)\n```\n\n---\n\n### LLM Agents\n\nRegister JavaScript functions as **tools** and combine tools + prompt into agents.\n\n```js\ndefAgent(\n    \"git\",\n    \"Query a repository using Git to accomplish tasks.\",\n    `Your are a helpful LLM agent that can use the git tools to query the current repository.\n    Answer the question in QUERY.\n    - The current repository is the same as github repository.`,\n    { model, system: [\"system.github_info\"], tools: [\"git\"] }\n)\n```\n\nthen use it as a tool\n\n```js\nscript({ tools: \"agent_git\" })\n\n$`Do a statistical analysis of the last commits`\n```\n\nSee the [git agent source](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fgenaiscript\u002Fblob\u002Fmain\u002Fpackages\u002Fcli\u002Fgenaisrc\u002Fsystem.agent_git.genai.mts).\n\n---\n\n### 🔍 RAG Built-in\n\n[Vector search](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fvector-search\u002F).\n\n```js\nconst { files } = await retrieval.vectorSearch(\"cats\", \"**\u002F*.md\")\n```\n\n---\n\n### 🐙 GitHub Models and GitHub Copilot\n\nRun models through [GitHub Models](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fconfiguration\u002Fgithub) or [GitHub Copilot](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fconfiguration\u002Fgithub-copilot-chat).\n\n```js\nscript({ ..., model: \"github:gpt-4o\" })\n```\n\n---\n\n### 💻 Local Models\n\nRun your scripts with [Open Source models](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fgetting-started\u002Fconfiguration\u002F), like [Phi-3](https:\u002F\u002Fazure.microsoft.com\u002Fen-us\u002Fblog\u002Fintroducing-phi-3-redefining-whats-possible-with-slms\u002F), using [Ollama](https:\u002F\u002Follama.com\u002F), [LocalAI](https:\u002F\u002Flocalai.io\u002F).\n\n```js\nscript({ ..., model: \"ollama:phi3\" })\n```\n\n---\n\n### 🐍 Code Interpreter\n\nLet the LLM run code in a sand-boxed execution environment.\n\n```js\nscript({ tools: [\"python_code_interpreter\"] })\n```\n\n---\n\n### 🐳 Containers\n\nRun code in Docker [containers](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fcontainer).\n\n```js\nconst c = await host.container({ image: \"python:alpine\" })\nconst res = await c.exec(\"python --version\")\n```\n\n---\n\n### Video processing\n\nTranscribe and screenshot your videos so that you can feed them efficiently in your LLMs requests.\n\n```js\n\u002F\u002F transcribe\nconst transcript = await transcript(\"path\u002Fto\u002Faudio.mp3\")\n\u002F\u002F screenshots at segments\nconst frames = await ffmpeg.extractFrames(\"path_url_to_video\", { transcript })\ndef(\"TRANSCRIPT\", transcript)\ndef(\"FRAMES\", frames)\n```\n\n### 🧩 LLM Composition\n\n[Run LLMs](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Finline-prompts\u002F) to build your LLM prompts.\n\n```js\nfor (const file of env.files) {\n    const { text } = await runPrompt((_) => {\n        _.def(\"FILE\", file)\n        _.$`Summarize the FILE.`\n    })\n    def(\"SUMMARY\", text)\n}\n$`Summarize all the summaries.`\n```\n\n---\n\n### 🅿️ Prompty support\n\nRun your [Prompty](https:\u002F\u002Fprompty.ai) files as well!\n\n```markdown\n---\nname: poem\n---\n\nWrite me a poem\n```\n\n---\n\n### Pluggable Secret Scanning\n\nScan your chats for secrets using [secret scanning](\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fsecret-scanning).\n\n```json\n{\n    \"secretPatterns\": {\n        ...,\n        \"OpenAI API Key\": \"sk-[A-Za-z0-9]{32,48}\"\n    }\n}\n```\n\n### ⚙ Automate with CLI or API\n\nAutomate using the [CLI](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fcli) or [API](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fapi).\n\n```bash\nnpx genaiscript run tlaplus-linter \"*.tla\"\n```\n\n```js\nimport { run } from \"genaiscript\u002Fapi\"\n\nconst res = await run(\"tlaplus-linter\", \"*.tla\")\n```\n\n---\n\n### Safety First!\n\nGenAIScript provides built-in Responsible AI system prompts and Azure Content Safety supports\nto validate [content safety](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fcontent-safety).\n\n```js wrap\nscript({ ...,\n    system: [\"system.safety_harmful_content\", ...],\n    contentSafety: \"azure\" \u002F\u002F use azure content safety\n})\n\nconst safety = await host.contentSafety()\nconst res = await safety.detectPromptInjection(env.vars.input)\n```\n\n---\n\n### 💬 Pull Request Reviews\n\nIntegrate into your [Pull Requests checks](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fcli\u002Frun\u002F#pull-requests) through comments, reviews, or description updates. Supports GitHub Actions and Azure DevOps pipelines.\n\n```bash wrap\nnpx genaiscript ... --pull-request-reviews\n```\n\n---\n\n### ⭐ Tests and Evals\n\nBuild reliable prompts using [tests and evals](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Ftests) powered by [promptfoo](https:\u002F\u002Fpromptfoo.dev\u002F).\n\n```js wrap\nscript({ ..., tests: {\n  files: \"penguins.csv\",\n  rubric: \"is a data analysis report\",\n  facts: \"The data refers about penguin population in Antarctica.\",\n}})\n```\n\n---\n\n### LLM friendly docs\n\nThe entire content of the docs is rendered at https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fllms-full.txt in markdown. Feed it directly into your favorite RAG system.\n\nIf you are an LLM crawler, add the `.md` suffix to any documentation URLs to get a raw markdown content. For example, https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fguides\u002Fprompt-as-code.md (note the .md extension)\n\n## Contributing\n\nWe accept contributions! Checkout the [CONTRIBUTING](.\u002FCONTRIBUTING.md) page for details and developer setup.\n\n---\n\n## Trademarks\n\nThis project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft\ntrademarks or logos is subject to and must follow\n[Microsoft's Trademark & Brand Guidelines](https:\u002F\u002Fwww.microsoft.com\u002Fen-us\u002Flegal\u002Fintellectualproperty\u002Ftrademarks\u002Fusage\u002Fgeneral).\nUse of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.\nAny use of third-party trademarks or logos are subject to those third-party's policies.\n","![一个黄色正方形，上方用黑色小写字母写着“gen”，下方用黑色大写字母写着“AI”。](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_genaiscript_readme_15ecb63bd203.png)\n\n# GenAIScript\n\n## 提示词即代码\n\n使用 JavaScript 以编程方式组装大型语言模型的提示词。在代码中编排 LLM、工具和数据。\n\n- 用于处理提示词的 JavaScript 工具箱\n- 简化操作并提高效率的抽象层\n- 无缝集成 Visual Studio Code 或灵活的命令行界面\n- 内置对 GitHub Copilot 和 GitHub Models、OpenAI、Azure OpenAI、Anthropic 等的支持\n\n- 📄 **在线文档请访问 [microsoft.github.io\u002Fgenaiscript](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002F)**\n- 💬 加入 [Discord 服务器](https:\u002F\u002Fdiscord.gg\u002Fy7HpumjHeB)\n- 📝 阅读 [博客](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fblog\u002F) 获取最新资讯\n- 📺 观看 [前田先生的温馨 AI 厨房](https:\u002F\u002Fyoutu.be\u002FajEbAm6kjI4)\n- 🤖 代理 - 阅读 [llms-full.txt](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fllms-full.txt)\n\n---\n\n## Hello world\n\n假设你想创建一个生成“hello world”诗歌的 LLM 脚本。你可以编写如下脚本：\n\n```js\n$`写一首“hello world”诗。`\n```\n\n`$` 函数是一个模板标签，用于创建提示词。随后，该提示词会被发送到你已配置的 LLM，由其生成诗歌。\n\n让我们通过添加文件、数据和结构化输出来使它更有趣。假设你想在提示词中包含一个文件，并将输出保存到另一个文件中。你可以编写如下脚本：\n\n```js\n\u002F\u002F 读取文件\nconst file = await workspace.readText(\"data.txt\")\n\u002F\u002F 以适合上下文的方式将文件内容纳入提示词\ndef(\"DATA\", file)\n\u002F\u002F 任务\n$`分析 DATA，并将数据提取为 JSON 格式，保存到 data.json 中。`\n```\n\n`def` 函数会将文件内容纳入提示词，并在必要时为目标 LLM 进行优化。GenAIScript 脚本还会解析 LLM 的输出，并自动提取出 `data.json` 文件。\n\n---\n\n## 🚀 快速入门指南\n\n通过安装 [Visual Studio Code 扩展](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fgetting-started\u002Finstallation\u002F) 或使用 [命令行](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fgetting-started\u002Finstallation) 即可快速上手。\n\n---\n\n## ✨ 功能特性\n\n### 🎨 风格化的 JavaScript 和 TypeScript\n\n使用 [JavaScript](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002F) 或 [TypeScript](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Ftypescript) 以编程方式构建提示词。\n\n```js\ndef(\"FILE\", env.files, { endsWith: \".pdf\" })\n$`总结 FILE。今天是 ${new Date()}。`\n```\n\n---\n\n### 🚀 快速开发循环\n\n在 [Visual Studio Code](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fgetting-started\u002Finstallation) 或通过 [命令行](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fgetting-started\u002Finstallation) 中编辑、[调试](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fgetting-started\u002Fdebugging-scripts\u002F)、[运行](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fgetting-started\u002Frunning-scripts\u002F) 和 [测试](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fgetting-started\u002Ftesting-scripts\u002F) 你的脚本。\n\n---\n\n### 🔗 脚本的复用与分享\n\n脚本就是 [文件](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002F)! 它们可以被版本控制、共享和分叉。\n\n```js\n\u002F\u002F 定义上下文\ndef(\"FILE\", env.files, { endsWith: \".pdf\" })\n\u002F\u002F 构建数据结构\nconst schema = defSchema(\"DATA\", { type: \"array\", items: { type: \"string\" } })\n\u002F\u002F 分配任务\n$`分析 FILE，并使用 ${schema} 模式将数据提取为 JSON。`\n```\n\n---\n\n### 📋 数据模式\n\n使用 [模式](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fschemas) 定义、验证和修复数据。内置 Zod 支持。\n\n```js\nconst data = defSchema(\"MY_DATA\", { type: \"array\", items: { ... } })\n$`使用 ${data} 模式从文件中提取数据。`\n```\n\n---\n\n### 📄 从 PDF、DOCX 等中提取文本\n\n操作 [PDF](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fpdf)、[DOCX](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fdocx) 等文件。\n\n```js\ndef(\"PDF\", env.files, { endsWith: \".pdf\" })\nconst { pages } = await parsers.PDF(env.files[0])\n```\n\n---\n\n### 📊 从 CSV、XLSX 等中提取表格数据\n\n处理来自 [CSV](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fcsv)、[XLSX](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fxlsx) 等的表格数据。\n\n```js\ndef(\"DATA\", env.files, { endsWith: \".csv\", sliceHead: 100 })\nconst rows = await parsers.CSV(env.files[0])\ndefData(\"ROWS\", rows, { sliceHead: 100 })\n```\n\n---\n\n### 📝 生成文件\n\n从 LLM 输出中提取文件并进行差异比较。在 Refactoring UI 中预览更改。\n\n```js\n$`将结果保存到 poem.txt 中。`\n```\n\n```txt\nFILE .\u002Fpoem.txt\n敏捷的棕狐跃过懒狗。\n```\n\n---\n\n### 🔍 文件搜索\n\n使用 grep 或模糊搜索 [文件](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Ffiles)。\n\n```js\nconst { files } = await workspace.grep(\u002F[a-z][a-z0-9]+\u002F, { globs: \"*.md\" })\n```\n\n---\n\n## 分类\n\n对文本、图片或两者的混合进行分类。\n\n```js\nconst joke = await classify(\n    \"为什么鸡要过马路？为了在阳光下煎一煎。\",\n    {\n        yes: \"好笑\",\n        no: \"不好笑\",\n    }\n)\n```\n\n### LLM 工具\n\n将 JavaScript 函数注册为 [工具](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Ftools)，并提供对不支持工具的模型的回退机制。还支持 [模型上下文协议 (MCP) 工具](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fmcp-tools)。\n\n```js\ndefTool(\n    \"weather\",\n    \"查询天气 Web API\",\n    { location: \"string\" },\n    async (args) =>\n        await fetch(`https:\u002F\u002Fweather.api.api\u002F?location=${args.location}`)\n)\n```\n\n---\n\n### LLM 代理\n\n将 JavaScript 函数注册为 **工具**，并将工具与提示词结合形成代理。\n\n```js\ndefAgent(\n    \"git\",\n    \"使用 Git 查询仓库以完成任务。\",\n    `你是一个有用的 LLM 代理，可以使用 git 工具查询当前仓库。\n    回答 QUERY 中的问题。\n    - 当前仓库与 GitHub 仓库相同。`,\n    { model, system: [\"system.github_info\"], tools: [\"git\"] }\n)\n```\n\n然后将其作为工具使用：\n\n```js\nscript({ tools: \"agent_git\" })\n\n$`对最近的提交进行统计分析。`\n```\n\n参见 [git 代理源码](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fgenaiscript\u002Fblob\u002Fmain\u002Fpackages\u002Fcli\u002Fgenaisrc\u002Fsystem.agent_git.genai.mts)。\n\n---\n\n### 🔍 内置 RAG\n\n[向量搜索](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fvector-search\u002F)。\n\n```js\nconst { files } = await retrieval.vectorSearch(\"cats\", \"**\u002F*.md\")\n```\n\n---\n\n### 🐙 GitHub 模型和 GitHub Copilot\n\n通过 [GitHub 模型](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fconfiguration\u002Fgithub) 或 [GitHub Copilot](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fconfiguration\u002Fgithub-copilot-chat) 运行模型。\n\n```js\nscript({ ..., model: \"github:gpt-4o\" })\n```\n\n---\n\n### 💻 本地模型\n\n使用 [开源模型](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fgetting-started\u002Fconfiguration\u002F)（如 [Phi-3](https:\u002F\u002Fazure.microsoft.com\u002Fen-us\u002Fblog\u002Fintroducing-phi-3-redefining-whats-possible-with-slms\u002F)），通过 [Ollama](https:\u002F\u002Follama.com\u002F) 或 [LocalAI](https:\u002F\u002Flocalai.io\u002F) 运行你的脚本。\n\n```js\nscript({ ..., model: \"ollama:phi3\" })\n```\n\n---\n\n### 🐍 代码解释器\n\n让大语言模型在一个沙盒执行环境中运行代码。\n\n```js\nscript({ tools: [\"python_code_interpreter\"] })\n```\n\n---\n\n### 🐳 容器\n\n在 Docker [容器](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fcontainer) 中运行代码。\n\n```js\nconst c = await host.container({ image: \"python:alpine\" })\nconst res = await c.exec(\"python --version\")\n```\n\n---\n\n### 视频处理\n\n对视频进行转录和截图，以便高效地将其输入到大语言模型的请求中。\n\n```js\n\u002F\u002F 转录\nconst transcript = await transcript(\"path\u002Fto\u002Faudio.mp3\")\n\u002F\u002F 按片段截取屏幕截图\nconst frames = await ffmpeg.extractFrames(\"path_url_to_video\", { transcript })\ndef(\"TRANSCRIPT\", transcript)\ndef(\"FRAMES\", frames)\n```\n\n### 🧩 大语言模型组合\n\n[运行大语言模型](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Finline-prompts\u002F) 来构建你的大语言模型提示。\n\n```js\nfor (const file of env.files) {\n    const { text } = await runPrompt((_) => {\n        _.def(\"FILE\", file)\n        _.$`总结 FILE。`\n    })\n    def(\"SUMMARY\", text)\n}\n$`总结所有摘要。`\n```\n\n---\n\n### 🅿️ Prompty 支持\n\n也可以运行你的 [Prompty](https:\u002F\u002Fprompty.ai) 文件！\n\n```markdown\n---\nname: poem\n---\n\n给我写一首诗\n```\n\n---\n\n### 可插拔的秘密扫描\n\n使用 [秘密扫描](\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fsecret-scanning) 扫描你的聊天内容中的敏感信息。\n\n```json\n{\n    \"secretPatterns\": {\n        ...,\n        \"OpenAI API Key\": \"sk-[A-Za-z0-9]{32,48}\"\n    }\n}\n```\n\n### ⚙ 使用 CLI 或 API 自动化\n\n通过 [CLI](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fcli) 或 [API](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fapi) 实现自动化。\n\n```bash\nnpx genaiscript run tlaplus-linter \"*.tla\"\n```\n\n```js\nimport { run } from \"genaiscript\u002Fapi\"\n\nconst res = await run(\"tlaplus-linter\", \"*.tla\")\n```\n\n---\n\n### 安全第一！\n\nGenAIScript 提供内置的负责任 AI 系统提示以及 Azure 内容安全支持，以验证 [内容安全](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Fcontent-safety)。\n\n```js wrap\nscript({ ...,\n    system: [\"system.safety_harmful_content\", ...],\n    contentSafety: \"azure\" \u002F\u002F 使用 Azure 内容安全\n})\n\nconst safety = await host.contentSafety()\nconst res = await safety.detectPromptInjection(env.vars.input)\n```\n\n---\n\n### 💬 拉取请求评审\n\n通过评论、评审或描述更新，将 GenAIScript 集成到你的 [拉取请求检查](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fcli\u002Frun\u002F#pull-requests) 中。支持 GitHub Actions 和 Azure DevOps 流水线。\n\n```bash wrap\nnpx genaiscript ... --pull-request-reviews\n```\n\n---\n\n### ⭐ 测试与评估\n\n使用由 [promptfoo](https:\u002F\u002Fpromptfoo.dev\u002F) 提供支持的 [测试和评估](https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Freference\u002Fscripts\u002Ftests)，构建可靠的提示。\n\n```js wrap\nscript({ ..., tests: {\n  files: \"penguins.csv\",\n  rubric: \"is a data analysis report\",\n  facts: \"The data refers about penguin population in Antarctica.\",\n}})\n```\n\n---\n\n### 大语言模型友好的文档\n\n整个文档的内容以 Markdown 格式渲染在 https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fllms-full.txt 上。可以直接将其输入到你喜爱的 RAG 系统中。\n\n如果你是大语言模型爬虫，只需在任何文档 URL 后添加 `.md` 后缀，即可获取原始 Markdown 内容。例如，https:\u002F\u002Fmicrosoft.github.io\u002Fgenaiscript\u002Fguides\u002Fprompt-as-code.md（注意 .md 扩展名）。\n\n## 贡献\n\n我们欢迎贡献！请查看 [CONTRIBUTING](.\u002FCONTRIBUTING.md) 页面，了解详细信息和开发者设置。\n\n---\n\n## 商标\n\n该项目可能包含项目、产品或服务的商标或标识。微软商标或标识的授权使用须遵守并遵循 [微软商标与品牌指南](https:\u002F\u002Fwww.microsoft.com\u002Fen-us\u002Flegal\u002Fintellectualproperty\u002Ftrademarks\u002Fusage\u002Fgeneral)。在本项目的修改版本中使用微软商标或标识时，不得造成混淆或暗示微软的赞助关系。任何第三方商标或标识的使用均受该第三方政策的约束。","# GenAIScript 快速上手指南\n\nGenAIScript 是一个基于 JavaScript\u002FTypeScript 的提示词编程工具箱，旨在通过代码编排大语言模型（LLM）、工具和数据处理流程。它支持无缝集成 Visual Studio Code 或命令行使用。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**：Windows, macOS, 或 Linux。\n*   **Node.js**：需安装 Node.js (推荐最新 LTS 版本)，以便运行脚本和管理依赖。\n    *   检查版本：`node -v`\n*   **编辑器（可选但推荐）**：Visual Studio Code，用于获得最佳的调试和编辑体验。\n*   **模型访问权限**：您需要配置至少一个大模型提供商的 API Key（如 OpenAI, Azure OpenAI, Anthropic, GitHub Models）或本地模型环境（如 Ollama）。\n\n## 安装步骤\n\n您可以选择通过 VS Code 扩展或命令行工具进行安装。\n\n### 方式一：安装 Visual Studio Code 扩展（推荐）\n\n1.  打开 Visual Studio Code。\n2.  进入扩展面板 (`Ctrl+Shift+X` 或 `Cmd+Shift+X`)。\n3.  搜索 `GenAIScript`。\n4.  点击 **Install** 安装由 Microsoft 发布的扩展。\n5.  安装完成后，重启 VS Code 即可在侧边栏看到 GenAIScript 面板。\n\n### 方式二：通过命令行安装\n\n如果您更喜欢使用终端或通过 CI\u002FCD 自动化运行，可以使用 npm\u002Fnpx 安装 CLI 工具：\n\n```bash\nnpx genaiscript@latest\n```\n\n或者全局安装：\n\n```bash\nnpm install -g genaiscript\n```\n\n> **注意**：国内用户若遇到 npm 下载缓慢，可临时切换至淘宝镜像源：\n> `npm config set registry https:\u002F\u002Fregistry.npmmirror.com`\n\n## 基本使用\n\nGenAIScript 的核心概念是“提示词即代码”（Prompting is Coding）。您可以编写 `.genai.mjs` 或 `.genai.ts` 脚本来定义提示词逻辑。\n\n### 1. 创建第一个脚本\n\n在项目根目录下创建一个名为 `hello.genai.mjs` 的文件，并写入以下内容：\n\n```js\n$`Write a 'hello world' poem.`\n```\n\n*   `$` 是一个模板标签函数，用于创建发送给 LLM 的提示词。\n*   脚本运行后，会自动调用配置的模型生成一首关于 \"hello world\" 的诗。\n\n### 2. 运行脚本\n\n**在 VS Code 中：**\n打开 `hello.genai.mjs` 文件，点击右上角的 **Run** 按钮（播放图标），输出结果将直接显示在终端或专用输出面板中。\n\n**在命令行中：**\n在项目目录下执行：\n\n```bash\nnpx genaiscript run hello.genai.mjs\n```\n\n### 3. 进阶示例：处理文件与结构化输出\n\nGenAIScript 擅长处理文件上下文和结构化数据。以下示例展示如何读取文件、将其内容注入提示词，并要求模型以 JSON 格式输出结果。\n\n创建 `analyze.genai.mjs`：\n\n```js\n\u002F\u002F 读取工作区中的文本文件\nconst file = await workspace.readText(\"data.txt\")\n\n\u002F\u002F 将文件内容定义为上下文变量 \"DATA\"\n\u002F\u002F GenAIScript 会自动优化长文本以适应模型上下文窗口\ndef(\"DATA\", file)\n\n\u002F\u002F 构建提示词：分析数据并提取为 JSON\n\u002F\u002F 模型输出的 JSON 内容将被自动解析并保存\n$`Analyze DATA and extract data in JSON in data.json.`\n```\n\n**运行效果：**\n1.  脚本读取 `data.txt`。\n2.  发送包含文件内容的提示词给 LLM。\n3.  LLM 返回分析结果，GenAIScript 自动识别其中的 `data.json` 代码块并将其保存为实际文件。\n\n### 4. 配置模型\n\n首次运行时，系统会提示您配置模型。您可以在 VS Code 的设置中或通过环境变量配置 API Key。例如，使用 GitHub Models 或 OpenAI：\n\n```js\n\u002F\u002F 在脚本头部指定模型（可选，默认使用全局配置）\nscript({ model: \"github:gpt-4o\" }) \n\u002F\u002F 或者使用本地 Ollama 模型\n\u002F\u002F script({ model: \"ollama:phi3\" })\n```\n\n现在您已经完成了 GenAIScript 的基础设置，可以开始探索更强大的功能，如 RAG 检索、Agent 编排和本地容器执行了。","某科技公司的数据分析师需要每周从数十份格式各异的 PDF 产品报告中提取关键指标，并整理为标准的 JSON 格式供下游系统使用。\n\n### 没有 genaiscript 时\n- 分析师需手动打开每个 PDF 复制文本到聊天窗口，反复粘贴提示词，效率极低且容易出错。\n- 缺乏统一的数据结构约束，大模型返回的 JSON 格式经常不一致，导致后续代码解析频繁报错。\n- 处理流程无法版本化管理，一旦逻辑调整，难以追溯历史操作或与他人协作复用脚本。\n- 面对非文本格式（如扫描版 PDF 或 DOCX），需要额外编写复杂的预处理代码来提取内容。\n\n### 使用 genaiscript 后\n- 通过几行 JavaScript 代码即可批量读取文件夹内的所有 PDF\u002FDOCX，自动将内容注入提示词上下文，实现一键全自动处理。\n- 利用内置的 `defSchema` 定义严格的数据校验规则，genaiscript 能自动修复大模型的输出偏差，确保生成的 JSON 永远符合预期结构。\n- 整个提取逻辑被封装为可版本控制的脚本文件，团队成员可直接在 VS Code 中调试、共享和迭代这套自动化流程。\n- 原生支持多种文档格式的解析抽象，无需关心底层文件转换细节，专注于业务逻辑本身。\n\ngenaiscript 将原本繁琐的人工“复制 - 粘贴 - 清洗”工作流，转变为可维护、可测试且高度自动化的代码工程，极大提升了数据处理的可靠性与开发效率。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_genaiscript_19fa368b.png","microsoft","Microsoft","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fmicrosoft_4900709c.png","Open source projects and samples from Microsoft",null,"opensource@microsoft.com","OpenAtMicrosoft","https:\u002F\u002Fopensource.microsoft.com","https:\u002F\u002Fgithub.com\u002Fmicrosoft",[82,86,90,94,98,102,106,110,113,117],{"name":83,"color":84,"percentage":85},"TypeScript","#3178c6",89.5,{"name":87,"color":88,"percentage":89},"JavaScript","#f1e05a",7.8,{"name":91,"color":92,"percentage":93},"Bicep","#519aba",1.1,{"name":95,"color":96,"percentage":97},"CSS","#663399",0.5,{"name":99,"color":100,"percentage":101},"Tree-sitter Query","#8ea64c",0.4,{"name":103,"color":104,"percentage":105},"TLA","#4b0079",0.3,{"name":107,"color":108,"percentage":109},"Gherkin","#5B2063",0.1,{"name":111,"color":112,"percentage":109},"Python","#3572A5",{"name":114,"color":115,"percentage":116},"Dockerfile","#384d54",0,{"name":118,"color":119,"percentage":116},"Jupyter Notebook","#DA5B0B",2890,224,"2026-04-04T14:18:21","MIT","未说明","非必需。支持通过 Ollama、LocalAI 等运行本地开源模型（如 Phi-3），或使用 GitHub Models、OpenAI、Azure OpenAI、Anthropic 等云端 API。若运行本地模型，具体 GPU 需求取决于所选模型。",{"notes":127,"python":128,"dependencies":129},"该工具主要基于 JavaScript\u002FTypeScript 运行，而非 Python。可通过 VS Code 扩展或命令行 (npx genaiscript) 使用。支持多种 LLM 后端（云端及本地）。若使用视频处理功能需安装 FFmpeg；若使用容器功能需安装 Docker；若运行本地模型需配置 Ollama 或 LocalAI。","未说明 (核心脚本语言为 JavaScript\u002FTypeScript)",[130,131,132,133,134,135],"Node.js (隐含)","Visual Studio Code (可选)","Ollama (可选，用于本地模型)","LocalAI (可选，用于本地模型)","Docker (可选，用于容器功能)","FFmpeg (可选，用于视频处理)",[35,13,14,137,15],"插件",[139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155],"genai","llm","vscode-extension","chatgpt","javascript","prompt-engineering","scripting","typescript","ai","genaistack","gpt","gpt4","agent","agents","deepseek-r1","phi4","llm-framework","2026-03-27T02:49:30.150509","2026-04-06T18:52:25.270632",[159,164,169,174,179,184],{"id":160,"question_zh":161,"answer_zh":162,"source_url":163},19699,"为什么提示 'Model not configured' 即使我已经在配置文件中设置了模型别名？","这通常是由于版本问题导致的模型别名解析错误。请尝试升级到最新版本（如 1.1193 或更高），开发者已修复了该根因并增加了日志记录以辅助调试。确保你的 `genaiscript.config.yml` 文件格式正确，且环境变量文件路径无误。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fgenaiscript\u002Fissues\u002F1328",{"id":165,"question_zh":166,"answer_zh":167,"source_url":168},19700,"运行脚本时提示 'Could not find a GenAiScript ... This is most likely a bug' 怎么办？","这是一个已知的问题，通常由相对路径解析混淆引起。请升级到版本 1.85.1 或更高，该版本修复了 CLI 返回绝对路径的逻辑，从而避免了此类错误。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fgenaiscript\u002Fissues\u002F930",{"id":170,"question_zh":171,"answer_zh":172,"source_url":173},19701,"使用 Google 模型提供者时遇到 Seed 参数报错或函数调用（Function Calling）无效的问题？","Google 的 OpenAI 兼容层存在局限性（如不支持 Seed 参数，函数调用行为异常）。建议升级到 v1.84.0 或更高版本，或者考虑等待原生 SDK 的支持（类似于 Anthropic 的实现），以获得更稳定的功能体验。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fgenaiscript\u002Fissues\u002F926",{"id":175,"question_zh":176,"answer_zh":177,"source_url":178},19702,"版本大于 1.78.2 时，在 VSCode 中运行脚本出现 'Assertion Failed' 错误 toaster 提示？","这是特定版本组合下的回归问题。请将 GenAIScript 扩展和 CLI 同时升级到 1.80.10 或更高版本，该问题已在后续版本中修复，升级后即可在 Run 和 Debug 模式下正常运行。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fgenaiscript\u002Fissues\u002F906",{"id":180,"question_zh":181,"answer_zh":182,"source_url":183},19703,"如何在 GenAIScript 中配置和使用 AWS Bedrock 上的模型（如 Anthropic 模型）？","你需要在脚本开始前设置 AWS 环境变量。可以在脚本中直接添加：\n```javascript\nprocess.env[\"AWS_ACCESS_KEY_ID\"] = \"...\"\nprocess.env[\"AWS_SECRET_ACCESS_KEY\"] = \"...\"\nprocess.env[\"AWS_SESSION_TOKEN\"] = \"...\"\n```\n或者将凭证放入单独的文件导入，亦或通过 `.env.genaiscript` 文件导出这些变量。目前暂不支持指定特定的 credential profile，需通过环境变量传递。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fgenaiscript\u002Fissues\u002F943",{"id":185,"question_zh":186,"answer_zh":187,"source_url":188},19704,"VSCode 扩展安装后点击运行没有任何反应，但命令行可以正常运行？","这通常是因为 Node.js 版本不兼容导致的。GenAIScript 需要 Node.js v20 或更高版本。如果你使用的是 nvm 等工具管理 Node 版本，请检查默认版本是否为 v18（不兼容），切换到 v20 即可解决初始化无反应的问题。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fgenaiscript\u002Fissues\u002F1508",[190,195,200,205,210,215,220,225,230,235,240,245,250,255,260,265,270,275,280,285],{"id":191,"version":192,"summary_zh":193,"released_at":194},117725,"2.5.1","- 🚀 **增强型 DevContainer**：已升级至 Node.js 24，以提升性能；并新增 Codespaces 仓库权限，助力工作流更加顺畅。  \n- 🛠️ **追踪安全性改进**：修复了服务器端追踪处理中的空指针解引用问题，确保更健壮的错误处理及可选链支持。  \n- 🌟 **环境元数据支持**：新增从 `GENAISCRIPT_DEFAULT_SCRIPT_META` 环境变量中解析并合并默认脚本元数据的功能。  \n- 📂 **文件操作**：优化了文件写入和调试日志追加功能，以提升追踪性。  \n- 🧪 **新增测试**：针对追踪安全性、环境元数据解析以及模板处理，引入了全面的测试用例。  \n- 📜 **示例脚本**：新增一个展示 `system.fs_write_file` 使用方法的示例脚本。  \n- 🧹 **.gitignore 更新**：将 `install-gh-aw.sh` 和 `gh-aw` 添加到忽略列表，使代码库更加整洁。","2025-09-26T15:04:43",{"id":196,"version":197,"summary_zh":198,"released_at":199},117726,"2.5.0","### 🚀 增强的模型上下文协议（MCP）支持  \n- 引入了 **MCP 配置加载**，实现与 Claude 格式服务器的无缝集成。  \n- 在 MCP 配置中新增了 **环境变量插值** 功能，便于灵活配置。  \n- 扩展了 **资源管理** 功能，纳入 MCP 服务器资源的管理。  \n\n### 🛡️ 安全性提升  \n- 对路径进行了校验，有效防范 **目录遍历攻击**。  \n- 加强了命令执行的安全性，增加了 **防止 Shell 注入** 的机制。  \n\n### 🌐 云集成扩展  \n- 增强了对 **AWS Bedrock 的支持**，包括区域验证和凭证检查。  \n\n### 🖼️ 更智能的图像生成  \n- 修复了 **DALL-E 模型兼容性问题**，适用于编辑和生成两种模式。  \n\n### 🔄 稳健的重试机制  \n- 新增了针对 VSCode 中语言聊天模型解析的 **重试逻辑**。  \n\n### 🧪 更完善的测试与调试  \n- 引入了全面的 **MCP 配置测试**。  \n- 改进了用于资源和模型处理的 **调试日志记录**。  \n\n### ⚡ 依赖项更新  \n- 升级至 **@modelcontextprotocol\u002Fsdk v1.18.0**，以获得最新功能和稳定性提升。  \n- 将 **esbuild** 更新至 v0.25.9。  \n\n本次发布带来了强大的集成能力、更高的安全性以及更流畅的工作流，助力 GenAIScript 用户高效工作！🚀✨","2025-09-16T17:03:44",{"id":201,"version":202,"summary_zh":203,"released_at":204},117727,"2.4.1","🎉 **GenAIScript 2.4.1 精彩更新！**\n\n🚀 **通过 Frontmatter 参数提升灵活性**  \nMarkdown 脚本现在可以直接在 frontmatter 中定义参数！这些参数可与提供的数据无缝集成，或使用默认值实现平滑的变量插值。  \n\n🌐 **域名访问控制**  \n新增 `allowedDomains` 功能，确保 HTTP 请求的安全性和可配置性。脚本现可覆盖全局设置，实现精准控制。  \n\n🔧 **资源解析优化**  \n现已正确处理 Windows 风格路径，并支持规范的文件 URI，从而提升兼容性和可靠性。  \n\n🛠️ **模型升级**  \n脚本现采用 `github_copilot_chat:gpt-4.1`，带来更强大的 AI 能力。  \n\n✅ **全面测试保障**  \n新增多项测试，确保稳定性与正确性，涵盖域名过滤、frontmatter 解析及 fetch 行为等方面。  \n\n立即升级，尽享这些改进吧！🎉","2025-08-22T17:17:22",{"id":206,"version":207,"summary_zh":208,"released_at":209},117728,"2.4.0","🎉 **GitHub 集成增强**：新增通过 CLI 直接创建 GitHub 问题的功能，只需使用 `--issue` 标志即可。系统会自动生成标题，并关联子问题，实现无缝的工作流管理。\n\n🚀 **动态上下文提取**：基于 token 的精准度提取特定行附近的文本范围，非常适合在有限的上下文中处理大型文件。\n\n🛠️ **FFmpeg 支持优化**：将 `fluent-ffmpeg` 替换为轻量级的自定义实现，显著提升了性能、错误处理能力，并增加了对高级视频\u002F音频处理选项的支持。\n\n📊 **全新资源工具**：通过新增的 `resource_list` 和 `resource_read` 工具，可轻松访问和读取多种资源类型（如 URL、文件和 Gist）。\n\n📅 **激活关键词扩展**：为变更日志、图表和文件生成等系统扩展了激活触发条件，使其更加直观易用。\n\n🔧 **Bug 修复与优化**：解决了 GitHub 客户端错误处理中的边缘情况，改进了服务器追踪管理，并优化了 CLI 选项，以提升用户体验。","2025-08-19T17:08:54",{"id":211,"version":212,"summary_zh":213,"released_at":214},117729,"2.3.15","### 🚀 新功能  \n- **增强的 MCP 配置**：新增通过 CLI 和 API 中的 `--mcps` 选项覆盖 MCP 配置的支持。支持灵活的基于文件的覆盖，并改进了错误处理机制。  \n- **改进的测试框架**：引入了高级进度跟踪、超时处理以及详细的测试运行摘要，从而在执行过程中提供更好的可见性和控制能力。  \n\n### 🛠 改进  \n- **CSV 解析的健壮性**：增强了 `CSVParse` 的错误处理能力，并添加了回退机制，以更好地保障数据完整性。  \n- **Markdown 脚本**：新增对 `@include` 指令的支持，用于内联外部文件内容，从而简化脚本的模块化设计。  \n\n### 🐛 问题修复  \n- **退出码**：修复了脚本取消时返回正确退出码的问题，解决了 #1853 号问题。  \n- **OpenAI API 类型**：在 OpenAI 集成中新增了对 `responses` API 类型的支持。  \n\n### 🧹 其他  \n- 改进了 CLI 选项，提供了更清晰的描述和默认值。  \n- 增强了测试结果及令牌使用统计的日志记录功能。","2025-08-12T11:43:29",{"id":216,"version":217,"summary_zh":218,"released_at":219},117730,"2.3.14","### GenAIScript 2.3.14 新功能 🚀\n\n- **工作区安全增强** 🛡️：引入了针对未经授权文件写入的强力防护措施，包括路径遍历攻击防护和 `.env` 文件访问限制。同时新增测试用例以验证工作区边界。\n\n- **CLI 功能改进** 🛠️：为 `test` 和 `list` 命令新增了 `--filter-model` 选项，用户可按模型筛选脚本。优化了测试执行逻辑，增强了错误处理能力，并保留了退出码。\n\n- **文件操作更简便** 📂：新增 `fs_write_file` 系统工具，用于在工作区内安全地写入或追加文本文件。父目录会自动创建。\n\n- **支持基于 URL 的 MCP 配置** 🌐：MCP 配置现支持 `url` 和 `type` 字段，以适应 HTTP、WebSocket 和 SSE 传输协议，同时保留原有的 `command` 选项。\n\n- **文档全面升级** 📚：在 `.ruler\u002Finstructions.md` 文件中扩展了仓库结构说明及构建指南。生成了内容更全面的 `llms.txt` 和 `llms-full.txt` 文件，有助于更好地优化 LLM 内容。\n\n- **性能更新** ⚡：优化了 `generateId` 函数，使其支持自定义 ID 长度。改进了 `host.exec`，确保保留退出码并提供详细的错误输出信息。\n\n- **VS Code 集成** 🖥️：在服务器管理器中新增对 `NODE_OPTIONS` 的支持，以提升调试能力和配置灵活性。\n\n- **新增示例脚本** 📝：提供了展示工作区安全机制、退出码处理等功能的示例脚本。\n\n尽享更加安全、灵活且易用的 GenAIScript 使用体验吧！🎉","2025-08-06T10:12:47",{"id":221,"version":222,"summary_zh":223,"released_at":224},117731,"2.3.13","- 🚀 **LLM 优化增强**：改进了 Markdown 和 MDX 的处理，更高效地提取核心概念和可操作的洞察。新增支持忽略 MDX 导入，使摘要更加简洁。  \n- 🖼️ **图像渲染升级**：终端图像渲染现可在禁用颜色时回退为 Unicode 字符，从而提升跨环境兼容性。  \n- 🔄 **重试逻辑简化**：精简了 OpenAI 和 fetch 操作的重试机制，减少冗余常量并提高灵活性。  \n- 🛠️ **调试改进**：增强了各组件的调试日志，包括 fetch、文件解析和补丁应用等，便于问题排查。  \n- 🧪 **新增测试**：引入了终端图像渲染的测试，确保对彩色输出和 Unicode 输出的稳健支持。  \n- 📖 **文档链接**：更新了 Action 描述，添加可点击链接，提升易用性。  \n- 🛡️ **依赖项更新**：升级了 Playwright 和 OpenAI SDK 等依赖项，以提升性能和安全性。","2025-08-04T09:39:53",{"id":226,"version":227,"summary_zh":228,"released_at":229},117732,"2.3.12","### 2.3.12 版本更新内容\n\n🚀 **图像生成功能增强**  \n- 引入 `BufferToBlob` 工具，提升图像处理能力。  \n- 更新图像生成模块，默认使用 `gpt-image-1` 模型。  \n- 优化了多部分请求中 `FormData` 的处理流程，提高兼容性和效率。  \n\n🎨 **Markdown 报告功能改进**  \n- 优化了 `toMarkdownReport` 方法，使使用摘要更加清晰简洁，并改进了令牌数和费用的格式化显示。  \n\n🐛 **Bug 修复与代码一致性提升**  \n- 修复了 `traceFetchPost` 中字符串请求体的处理问题。  \n- 解决了代码库中一些细微的格式和类型不一致问题。  \n\n现在，您可以享受更加稳定、完善的 GenAIScript 使用体验！","2025-08-02T06:00:55",{"id":231,"version":232,"summary_zh":233,"released_at":234},117733,"2.3.11","🎉 **LLM 优化增强**：推出全新脚本，可从 Markdown 文件生成简洁、针对大语言模型优化的内容，提升内容的清晰度和相关性，便于 AI 处理。\n\n🛠️ **PHP & Ruby 系统支持**：新增 PHP 和 Ruby 专用系统，支持更优质的代码生成，并更好地遵循最佳实践。\n\n🚀 **Azure & OpenAI 改进**：更新了 Azure OpenAI API 版本，增强了图像生成的兼容性，包括编辑和生成模式。\n\n🔍 **模型列表优化**：改进了跨多家提供商的模型列表处理逻辑，有助于更高效的调试及各提供商特定配置的管理。\n\n📋 **.gitignore 更新**：扩展了 `.gitignore` 规则，以更好地管理开发工作区，减少开发环境中的噪声。\n\n🐛 **缺陷修复**：修复了文件忽略逻辑、环境变量解析以及令牌处理等方面的问题，使系统运行更加流畅。","2025-08-01T10:20:28",{"id":236,"version":237,"summary_zh":238,"released_at":239},117734,"2.3.10","- 🚀 **MCP 服务器的 HTTP 传输**：在模型上下文协议（MCP）服务器中新增了对 HTTP 传输的支持，从而简化集成并提升网络访问性。包含基于 Fastify 的实现，支持代理、CORS 以及健康检查端点。  \n- 🛠️ **代码辅助工具增强**：为 C\u002FC++、Go、Java 和 Rust 引入了新的代码辅助脚本，提供最佳实践建议和代码质量改进方案。  \n- 🧹 **文件处理优化**：扩展了对 `.genai.md` 文件的支持，并优化了文件匹配模式，以更好地处理脚本和 Markdown 文件。  \n- 🧪 **CLI 易用性提升**：为各 CLI 工具中的列表命令添加了别名（`ls`），从而提升用户体验。  \n- 🐛 **Bug 修复与代码清理**：解决了多项问题，包括冗余代码、类型细化及正则表达式修复，确保代码库更加健壮且易于维护。  \n- 🔍 **注解与诊断**：增强了诊断信息的解析功能，实现了更好的去重效果，并改进了 GitHub 注解的处理方式。  \n- 🌐 **Azure 功能增强**：简化了 Azure OpenAI 模型的列表获取流程，并优化了 Azure AI Search 的分块逻辑，以提升性能。","2025-07-25T12:40:53",{"id":241,"version":242,"summary_zh":243,"released_at":244},117735,"2.3.9","### What's New in 2.3.9\n\n🚀 **Enhanced CLI Functionality**  \n- Added a `--check` option to the `model alias` command, enabling inference tests for model alias configurations.\n\n🛠️ **Improved Model Handling**  \n- Enhanced support for OpenAI models with refined token handling and compatibility for `openai\u002Fo1`, `o3`, and `o4` families.\n\n📚 **GitHub Markdown Alerts Support**  \n- Introduced full support for GitHub alert syntax (`[!NOTE]`, `[!TIP]`, etc.) in Markdown processing, making documentation more expressive and structured.\n\n🖼️ **Vision Model Improvements**  \n- Updated the \"image-to-mermaid\" script sample to better handle image-to-diagram conversions with a streamlined configuration.\n\n🔍 **Environment Variable Parsing**  \n- Added support for model-specific API version parsing via environment variables for more flexible configuration.\n\n✨ **Miscellaneous Fixes**  \n- Adjusted YAML parsing and removed deprecated INI parsing.\n- Fine-tuned behavior for vision and reasoning model classifications.","2025-07-21T19:45:43",{"id":246,"version":247,"summary_zh":248,"released_at":249},117736,"2.3.8","- 🔧 Enhanced cost estimation logic for GPT models, including better handling of GitHub and Azure model identifiers.  \n- 🛠️ Added support for parsing and normalizing `github:openai\u002F` model prefixes.  \n- ✅ Expanded test coverage to validate cost estimation across multiple providers and model formats.","2025-07-21T09:55:18",{"id":251,"version":252,"summary_zh":253,"released_at":254},117737,"2.3.7","🚀 **GenAIScript 2.3.7 Highlights**\n\n- 🌐 **Enhanced OpenAPI Support**: Added query parameter schema and expanded model configuration options, enabling greater flexibility for web API integrations.\n- 🛠️ **Improved CLI**: Introduced the `openapi` alias for `webapi` and streamlined server options for easier usage.\n- 🖼️ **Vision Model Support**: Added a new \"image-to-mermaid\" script to generate Mermaid diagrams from images using vision models.\n- 🧠 **Model Customization**: Expanded support for overriding model parameters such as temperature, reasoning effort, and token limits.\n- 🐛 **Bug Fixes & Stability**:\n  - Fixed parsing issues with retry-after headers and improved fetch retry behavior.\n  - Addressed type inconsistencies and improved error handling across modules.\n- 📦 **Dependency Updates**: Adjusted Node.js type dependencies and refined package configurations for better compatibility.\n- 📄 **Sample Improvements**: Updated and added new examples, including GitHub reaction handling and syntax checks, for more practical use cases.","2025-07-21T09:38:07",{"id":256,"version":257,"summary_zh":258,"released_at":259},117738,"2.3.6","✨ Improved Asset Organization: We've streamlined our file structure by moving assets from the `built\u002F` directory to the `dist\u002F` directory. This change enhances clarity and prepares the project for better scalability.  \n\n🚀 Updated Resource Paths: All references to stylesheets and scripts have been updated to reflect the new `dist\u002F` directory, ensuring a smoother and more consistent user experience.  \n\n🛠️ Better Build Management: These updates pave the way for a more efficient build process, reducing potential confusion for developers and contributors.","2025-07-17T17:08:29",{"id":261,"version":262,"summary_zh":263,"released_at":264},117739,"2.3.5","📚 **Documentation Update:** Simplified and streamlined the README by removing outdated references, including the link to \"Mr. Maeda's Cozy AI Kitchen.\" Stay focused with cleaner, more relevant resources! 🚀","2025-07-17T16:44:05",{"id":266,"version":267,"summary_zh":268,"released_at":269},117740,"2.3.4","✨ **GenAIScript 2.3.4 Highlights**\n\n- 🛠️ Fixed broken routes for static assets by updating paths from `\u002Fbuilt` to `\u002Fdist`, ensuring smoother resource loading.  \n- 🔒 Enhanced code quality with stricter TypeScript type annotations and ESLint rules.  \n- 🚀 Improved webview creation with refined CSP handling and dynamic asset linking.  \n- 🧹 Removed redundant runtime host disposal to prevent potential issues.  \n\nEnjoy the updates!","2025-07-17T16:17:48",{"id":271,"version":272,"summary_zh":273,"released_at":274},117741,"2.3.3","### What's New in GenAIScript 2.3.3\n\n🚀 **Improved Runtime Host Integration**  \nReplaced the global `host` variable with `resolveRuntimeHost()` for better modularity and runtime flexibility.\n\n🛠️ **Enhanced File Handling**  \nStreamlined file operations by centralizing logic around `resolveRuntimeHost()`. This ensures more consistent behavior across file reads, writes, and path resolutions.\n\n🧹 **Code Cleanup & Consistency**  \nRemoved unused constants, standardized logging methods, and added type annotations for improved maintainability and clarity.\n\n💡 **New Logging Utilities**  \nIntroduced centralized logging functions (`logInfo`, `logVerbose`, `logWarn`, `logError`) for cleaner and more consistent log management.\n\n📂 **Better Directory Management**  \nImproved handling of `.gitignore` and `.genaiscriptignore` to ensure essential entries are always included.\n\n🐛 **Bug Fixes**  \nAddressed various runtime issues, including path resolution inconsistencies and file operation edge cases.","2025-07-17T15:31:41",{"id":276,"version":277,"summary_zh":278,"released_at":279},117742,"2.3.2","🎉 **Enhanced Type Safety**: The `installWindow` function now explicitly returns a `Promise\u003Cvoid>`, ensuring better clarity and type safety for developers.  \n\n📄 **Improved File Parsing**: Added support for resolving file content when parsing `WorkspaceFile` objects, streamlining workflows and enhancing compatibility with complex file types.  \n\n🛠️ **Refinements**: Minor internal improvements to maintain robustness and reliability.","2025-07-17T09:05:23",{"id":281,"version":282,"summary_zh":283,"released_at":284},117743,"2.3.1","### What's New in GenAIScript 2.3.1\n\n🚀 **Enhanced Python Support**  \nPyodide integration has been extracted into a dedicated plugin, `@genaiscript\u002Fplugin-pyodide`, for seamless Python runtime management. Check out the new plugin for better modularity and improved Python workflows.\n\n🧠 **MapReduce with LLMs**  \nIntroduced `mapPrompt` and `reducePrompt` utilities for large-scale data processing using LLMs. Effortlessly map and reduce operations across datasets with the power of AI.\n\n🔧 **Improved UTF-8 Handling**  \nRefactored UTF-8 encoding\u002Fdecoding utilities into a standalone module, enhancing maintainability and ensuring consistency across the codebase.\n\n📚 **Model Updates**  \nUpdated Anthropics model aliases to support the latest `claude-sonnet-4-0` versions, improving reasoning and vision capabilities.\n\n🛠️ **Internal Cleanups**  \nStreamlined host capabilities by removing unused Python runtime methods and deprecated functionalities, making the core runtime lighter and faster.\n\n🌐 **Documentation Links**  \nImproved plugin documentation links for better accessibility and clarity.\n\n✨ **Sample Enhancements**  \nAdded new examples showcasing MapReduce and Pyodide integration to help users get started quickly.","2025-07-17T08:36:19",{"id":286,"version":287,"summary_zh":288,"released_at":289},117744,"2.3.0","🚀 **What's New in GenAIScript 2.3.0**\n\n### 🌟 Enhanced Clarity and Usability\n- Improved documentation with better explanations of the `$` function and its context injection, making it easier for developers to get started.\n\n### 🛠️ Major Refactor: Runtime Host Handling\n- Replaced `runtimeHost` with a new `resolveRuntimeHost()` function, streamlining runtime initialization and improving flexibility.\n- Simplified and modularized runtime-related code for better maintainability and debugging.\n\n### 🧹 Cleanup and Deprecations\n- Removed legacy automation scripts, configurations, and browser-related runtime methods to focus on core functionality.\n- Deleted outdated and unused TypeScript configurations and scripts, reducing project bloat.\n\n### 🐛 Bug Fixes and Optimizations\n- Addressed edge cases in JSON and schema validation for better error handling.\n- Fixed minor issues in environment variable parsing and token resolution for smoother integration.\n\nThis release refines the core, enhances clarity, and sets the stage for future innovations. Enjoy the streamlined experience! ✨","2025-07-16T09:07:09"]