[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-imaurer--awesome-llm-json":3,"tool-imaurer--awesome-llm-json":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 真正成长为懂上",156804,2,"2026-04-15T11:34:33",[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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"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":77,"owner_email":78,"owner_twitter":72,"owner_website":79,"owner_url":80,"languages":78,"stars":81,"forks":82,"last_commit_at":83,"license":84,"difficulty_score":85,"env_os":86,"env_gpu":87,"env_ram":87,"env_deps":88,"category_tags":91,"github_topics":92,"view_count":32,"oss_zip_url":78,"oss_zip_packed_at":78,"status":17,"created_at":99,"updated_at":100,"faqs":101,"releases":102},7775,"imaurer\u002Fawesome-llm-json","awesome-llm-json","Resource list for generating JSON using LLMs via function calling, tools, CFG. Libraries, Models, Notebooks, etc.","awesome-llm-json 是一份专为利用大语言模型（LLM）生成 JSON 及其他结构化数据而整理的精选资源清单。在 AI 应用开发中，让模型输出严格符合格式要求的代码或数据往往充满挑战，容易出现语法错误或结构偏差。这份清单直击这一痛点，系统性地汇集了实现“结构化输出”的各类关键资源，涵盖主流托管模型与本地部署方案、Python 核心库、技术博客、视频教程及实战 Notebook 等。\n\n它特别梳理了行业内容易混淆的技术概念，如函数调用（Function Calling）、JSON 模式、工具使用（Tool Usage）以及基于上下文无关文法的引导生成（Guided Generation），帮助开发者厘清不同技术路径的适用场景。无论是需要集成 API 的后端工程师、探索模型能力的研究人员，还是希望提升应用稳定性的全栈开发者，都能从中快速找到适合的解决方案和最佳实践。通过整合从理论术语到具体代码实现的完整生态，awesome-llm-json 旨在降低结构化数据生成的门槛，让大模型更可靠地服务于实际业务逻辑。","# Awesome LLM JSON List\n\nThis awesome list is dedicated to resources for using Large Language Models (LLMs) to generate JSON or other structured outputs.\n  \n## Table of Contents  \n  \n* [Terminology](#terminology)  \n* [Hosted Models](#hosted-models)\n* [Local Models](#local-models)\n* [Python Libraries](#python-libraries)\n* [Blog Articles](#blog-articles)\n* [Videos](#videos) \n* [Jupyter Notebooks](#jupyter-notebooks)\n* [Leaderboards](#leaderboards)\n  \n## Terminology  \n  \nUnfortunately, generating JSON goes by a few different names that roughly mean the same thing:  \n  \n* [Structured Outputs](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Fstructured-outputs): Using an LLM to generate any structured output including JSON, XML, or YAML regardless of technique (e.g. function calling, guided generation).\n* [Function Calling](https:\u002F\u002Fwww.promptingguide.ai\u002Fapplications\u002Ffunction_calling): Providing an LLM a hypothetical (or actual) function definition for it to \"call\" in it's chat or completion response. The LLM doesn't actually call the function, it just provides an indication that one should be called via a JSON message.\n* [JSON Mode](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Ftext-generation\u002Fjson-mode): Specifying that an LLM must generate valid JSON. Depending on the provider, a schema may or may not be specified and the LLM may create an unexpected schema.\n* [Tool Usage](https:\u002F\u002Fpython.langchain.com\u002Fdocs\u002Fconcepts\u002Ftools\u002F): Giving an LLM a choice of tools such as image generation, web search, and \"function calling\".  The functional calling parameter in the API request is now called \"tools\".\n* [Guided Generation](https:\u002F\u002Farxiv.org\u002Fabs\u002F2307.09702): For constraining an LLM model to generate text that follows a prescribed specification such as a [Context-Free Grammar](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FContext-free_grammar).\n* [GPT Actions](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Factions\u002Fintroduction): ChatGPT invokes actions (i.e. API calls) based on the endpoints and parameters specified in an [OpenAPI specification](https:\u002F\u002Fswagger.io\u002Fspecification\u002F). Unlike the capability called \"Function Calling\", this capability will indeed call your function hosted by an API server.\n\nNone of these names are great, that's why I named this list just \"Awesome LLM JSON\".\n  \n## Hosted Models\n\n| Provider     | Models                                                                             | Links                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n|--------------|------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Anthropic    | claude-3-opus-20240229\u003Cbr>claude-3-sonnet-20240229\u003Cbr>claude-3-haiku-20240307      | [API Docs](https:\u002F\u002Fdocs.anthropic.com\u002Fclaude\u002Fdocs\u002Ftool-use)\u003Cbr>[Pricing](https:\u002F\u002Fdocs.anthropic.com\u002Fclaude\u002Fdocs\u002Ftool-use)                                                                                                                                                                                                                                                                                                                |\n| AnyScale     | Mistral-7B-Instruct-v0.1\u003Cbr>Mixtral-8x7B-Instruct-v0.1                             | [Function Calling](https:\u002F\u002Fdocs.endpoints.anyscale.com\u002Ftext-generation\u002Ffunction-calling)\u003Cbr>[JSON Mode](https:\u002F\u002Fdocs.endpoints.anyscale.com\u002Ftext-generation\u002Fjson-mode)\u003Cbr>[Pricing](https:\u002F\u002Fdocs.endpoints.anyscale.com\u002Fpricing\u002F)\u003Cbr>[Announcement (2023)](https:\u002F\u002Fwww.anyscale.com\u002Fblog\u002Fanyscale-endpoints-json-mode-and-function-calling-features)                                                                                     |\n| Azure        | gpt-4\u003Cbr>gpt-4-turbo\u003Cbr>gpt-35-turbo\u003Cbr>mistral-large-latest\u003Cbr>mistral-large-2402 | [Function Calling](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fazure\u002Fai-services\u002Fopenai\u002Fhow-to\u002Ffunction-calling?tabs=python)\u003Cbr>[OpenAI Pricing](https:\u002F\u002Fazure.microsoft.com\u002Fen-us\u002Fpricing\u002Fdetails\u002Fcognitive-services\u002Fopenai-service\u002F#pricing)\u003Cbr>[Mistral Pricing](https:\u002F\u002Fazuremarketplace.microsoft.com\u002Fen-us\u002Fmarketplace\u002Fapps\u002F000-000.mistral-ai-large-offer?tab=PlansAndPrice)                                                                |\n| Cohere       | Command-R\u003Cbr>Command-R+                                                            | [Function Calling](https:\u002F\u002Fdocs.cohere.com\u002Fdocs\u002Ftool-use)\u003Cbr>[Pricing](https:\u002F\u002Fcohere.com\u002Fpricing)\u003Cbr>[Command-R (2024-03-11)](https:\u002F\u002Ftxt.cohere.com\u002Fcommand-r\u002F)\u003Cbr>[Command-R+ (2024-04-04)](https:\u002F\u002Ftxt.cohere.com\u002Fcommand-r-plus-microsoft-azure\u002F)                                                                                                                                                                                   |\n| Fireworks.ai | firefunction-v1                                                                    | [Function Calling](https:\u002F\u002Freadme.fireworks.ai\u002Fdocs\u002Ffunction-calling)\u003Cbr>[JSON Mode](https:\u002F\u002Freadme.fireworks.ai\u002Fdocs\u002Fstructured-response-formatting)\u003Cbr>[Grammar mode](https:\u002F\u002Freadme.fireworks.ai\u002Fdocs\u002Fstructured-output-grammar-based)\u003Cbr>[Pricing](https:\u002F\u002Ffireworks.ai\u002Fpricing)\u003Cbr>[Announcement (2023-12-20)](https:\u002F\u002Fblog.fireworks.ai\u002Ffireworks-raises-the-quality-bar-with-function-calling-model-and-api-release-e7f49d1e98e9) |\n| Google       | gemini-1.0-pro                                                                     | [Function Calling](https:\u002F\u002Fcloud.google.com\u002Fvertex-ai\u002Fdocs\u002Fgenerative-ai\u002Fmultimodal\u002Ffunction-calling#rest)\u003Cbr>[Pricing](https:\u002F\u002Fai.google.dev\u002Fpricing?authuser=1)                                                                                                                                                                                                                                                                        |\n| Groq         | llama2-70b\u003Cbr>mixtral-8x7b\u003Cbr>gemma-7b-it                                          | [Function Calling](https:\u002F\u002Fconsole.groq.com\u002Fdocs\u002Ftool-use)\u003Cbr>[Pricing](https:\u002F\u002Fwow.groq.com\u002F)                                                                                                                                                                                                                                                                                                                                           |\n| Hugging Face TGI         | [many open-source models](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftext-generation-inference\u002Fsupported_models)                                           | [Grammars, JSON mode, Function Calling and Tools](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftext-generation-inference\u002Fconceptual\u002Fguidance#guidance)\u003Cbr>For [free locally](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftext-generation-inference\u002Fbasic_tutorials\u002Fconsuming_tgi), or via [dedicated](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Finference-endpoints\u002Findex) or [serverless](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fapi-inference\u002Findex) endpoints.                                                                                                                                                                                                                                                                                                                                             |\n| Mistral      | mistral-large-latest                                                               | [Function Calling](https:\u002F\u002Fdocs.mistral.ai\u002Fguides\u002Ffunction-calling\u002F)\u003Cbr>[Pricing](https:\u002F\u002Fdocs.mistral.ai\u002Fplatform\u002Fpricing\u002F)                                                                                                                                                                                                                                                                                                             |\n| OpenAI       | gpt-4\u003Cbr>gpt-4-turbo\u003Cbr>gpt-35-turbo                                               | [Function Calling](https:\u002F\u002Fopenai.com\u002Fblog\u002Fopenai-api\u002F)\u003Cbr>[JSON Mode](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Ftext-generation\u002Fjson-mode)\u003Cbr>[Pricing](https:\u002F\u002Fopenai.com\u002Fpricing)\u003Cbr>[Announcement (2023-06-13)](https:\u002F\u002Fopenai.com\u002Fblog\u002Ffunction-calling-and-other-api-updates)                                                                                                                                                        |\n| Rysana       | inversion-sm                                                                       | [API Docs](https:\u002F\u002Frysana.com\u002Fdocs\u002Fapi)\u003Cbr>[Pricing](https:\u002F\u002Frysana.com\u002Fpricing)\u003Cbr>[Announcement (2024-03-18)](https:\u002F\u002Frysana.com\u002Finversion)                                                                                                                                                                                                                                                                                            |\n| Together AI  | Mixtral-8x7B-Instruct-v0.1\u003Cbr>Mistral-7B-Instruct-v0.1\u003Cbr>CodeLlama-34b-Instruct   | [Function Calling](https:\u002F\u002Fdocs.together.ai\u002Fdocs\u002Ffunction-calling)\u003Cbr>[JSON Mode](https:\u002F\u002Fdocs.together.ai\u002Fdocs\u002Fjson-mode)\u003Cbr>[Pricing](https:\u002F\u002Ftogether.ai\u002Fpricing\u002F)\u003Cbr>[Announcement 2024-01-31](https:\u002F\u002Fwww.together.ai\u002Fblog\u002Ffunction-calling-json-mode)                                                                                                                                                                              |\n\n**Parallel Function Calling**\n\nBelow is a list of hosted API models that support multiple parallel function calls. This could include checking the weather in multiple cities or first finding the location of a hotel and then checking the weather at it's location.\n\n- anthropic\n\t- claude-3-opus-20240229\n\t- claude-3-sonnet-20240229\n\t- claude-3-haiku-20240307\n- azure\u002Fopenai\n\t- gpt-4-turbo-preview\n\t- gpt-4-1106-preview\n\t- gpt-4-0125-preview\n\t- gpt-3.5-turbo-1106\n\t- gpt-3.5-turbo-0125\n- cohere\n\t- command-r\n- together_ai\n\t- Mixtral-8x7B-Instruct-v0.1\n\t- Mistral-7B-Instruct-v0.1\n\t- CodeLlama-34b-Instruct\n \n## Local Models\n\n[Mistral 7B Instruct v0.3](https:\u002F\u002Fhuggingface.co\u002Fmistralai\u002FMistral-7B-Instruct-v0.3) (2024-05-22, Apache 2.0) an instruct fine-tuned version of Mistral with added function calling support.\n\n[C4AI Command R+](https:\u002F\u002Fhuggingface.co\u002FCohereForAI\u002Fc4ai-command-r-plus) (2024-03-20, CC-BY-NC, Cohere) is a 104B parameter multilingual model with advanced Retrieval Augmented Generation (RAG) and tool use capabilities, optimized for reasoning, summarization, and question answering across 10 languages. Supports quantization for efficient use and demonstrates unique multi-step tool integration for complex task execution.\n\n[Hermes 2 Pro - Mistral 7B](https:\u002F\u002Fhuggingface.co\u002FNousResearch\u002FHermes-2-Pro-Mistral-7B) (2024-03-13, Nous Research) is a 7B parameter model that excels at function calling, JSON structured outputs, and general tasks. Trained on an updated OpenHermes 2.5 Dataset and a new function calling dataset, it uses a special system prompt and multi-turn structure. Achieves 91% on function calling and 84% on JSON mode evaluations.\n\n[Gorilla OpenFunctions v2](https:\u002F\u002Fgorilla.cs.berkeley.edu\u002F\u002Fblogs\u002F7_open_functions_v2.html) (2024-02-27, Apache 2.0 license, [Charlie Cheng-Jie Ji et al.](https:\u002F\u002Fgorilla.cs.berkeley.edu\u002F\u002Fblogs\u002F7_open_functions_v2.html))  interprets and executes functions based on JSON Schema Objects, supporting multiple languages and detecting function relevance.\n\n[NexusRaven-V2](https:\u002F\u002Fnexusflow.ai\u002Fblogs\u002Fravenv2) (2023-12-05, Nexusflow)  is a 13B model outperforming GPT-4 in zero-shot function calling by up to 7%, enabling effective use of software tools. Further instruction-tuned on CodeLlama-13B-instruct.\n\n[Functionary](https:\u002F\u002Ffunctionary.meetkai.com\u002F) (2023-08-04, [MeetKai](https:\u002F\u002Fmeetkai.com\u002F)) interprets and executes functions based on JSON Schema Objects, supporting various compute requirements and call types. Compatible with OpenAI-python and llama-cpp-python for efficient function execution in JSON generation tasks.\n\n[Hugging Face TGI](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftext-generation-inference\u002Fconceptual\u002Fguidance) enables JSON outputs and function calling for a [variety of local models](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftext-generation-inference\u002Fsupported_models). \n\n\n## Python Libraries\n\n\n[DSPy](https:\u002F\u002Fgithub.com\u002Fstanfordnlp\u002Fdspy) (MIT) is a framework for algorithmically optimizing LM prompts and weights. DSPy introduced [typed predictor and signatures](https:\u002F\u002Fgithub.com\u002Fentropy\u002Fdspy\u002Fblob\u002Fmain\u002Fdocs\u002Fdocs\u002Fbuilding-blocks\u002F8-typed_predictors.md) to leverage [Pydantic](https:\u002F\u002Fgithub.com\u002Fpydantic\u002Fpydantic) for enforcing type constraints on inputs and outputs, improving upon string-based fields. \n\n[FuzzTypes](https:\u002F\u002Fgithub.com\u002Fgenomoncology\u002FFuzzTypes) (MIT) extends Pydantic with autocorrecting annotation types for enhanced data normalization and handling of complex types like emails, dates, and custom entities.\n\n[guidance](https:\u002F\u002Fgithub.com\u002Fguidance-ai\u002Fguidance) (Apache-2.0) enables constrained generation, interleaving Python logic with LLM calls, reusable functions, and calling external tools. Optimizes prompts for faster generation.\n\n[Instructor](https:\u002F\u002Fgithub.com\u002Fjxnl\u002Finstructor) (MIT) simplifies generating structured data from LLMs using Function Calling, Tool Calling, and constrained sampling modes. Built on Pydantic for validation and supports various LLMs.\n\n[LangChain](https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain) (MIT) provides an interface for chains, integrations with other tools, and chains for applications. LangChain offers [structured outputs](https:\u002F\u002Fpython.langchain.com\u002Fdocs\u002Fhow_to\u002Fstructured_output\u002F) and [tool calling](https:\u002F\u002Fpython.langchain.com\u002Fdocs\u002Fhow_to\u002Ftool_calling\u002F) across models.\n\n[LiteLLM](https:\u002F\u002Fgithub.com\u002FBerriAI\u002Flitellm) (MIT) simplifies calling 100+ LLMs in the OpenAI format, supporting [function calling](https:\u002F\u002Fdocs.litellm.ai\u002Fdocs\u002Fcompletion\u002Ffunction_call), tool calling, and JSON mode.\n\n[LlamaIndex](https:\u002F\u002Fgithub.com\u002Frun-llama\u002Fllama_index) (MIT) provides [modules for structured outputs](https:\u002F\u002Fdocs.llamaindex.ai\u002Fen\u002Fstable\u002Fmodule_guides\u002Fquerying\u002Fstructured_outputs\u002Fstructured_outputs.html) at different levels of abstraction, including output parsers for text completion endpoints, [Pydantic programs](https:\u002F\u002Fdocs.llamaindex.ai\u002Fen\u002Fstable\u002Fmodule_guides\u002Fquerying\u002Fstructured_outputs\u002Fpydantic_program.html) for mapping prompts to structured outputs using function calling or output parsing, and pre-defined Pydantic programs for specific output types.\n\n[Marvin](https:\u002F\u002Fgithub.com\u002FPrefectHQ\u002Fmarvin) (Apache-2.0) is a lightweight toolkit for building reliable natural language interfaces with self-documenting tools for tasks like entity extraction and multi-modal support.\n\n[Outlines](https:\u002F\u002Fgithub.com\u002Foutlines-dev\u002Foutlines) (Apache-2.0) facilitates structured text generation using multiple models, Jinja templating, and support for regex patterns, JSON schemas, Pydantic models, and context-free grammars.\n\n[Pydantic](https:\u002F\u002Fgithub.com\u002Fpydantic\u002Fpydantic) (MIT) simplifies working with data structures and JSON through data model definition, validation, JSON schema generation, and seamless parsing and serialization.\n\n[PydanticAI](https:\u002F\u002Fgithub.com\u002Fpydantic\u002Fpydantic-ai) (MIT) is a Python agent framework designed to make it less painful to build production grade applications with Generative AI.\n\n[SGLang](https:\u002F\u002Fgithub.com\u002Fsgl-project\u002Fsglang) (MPL-2.0) allows specifying JSON schemas using regular expressions or Pydantic models for constrained decoding. Its high-performance runtime accelerates JSON decoding.\n\n[SynCode](https:\u002F\u002Fgithub.com\u002Fuiuc-focal-lab\u002Fsyncode) (MIT) is a framework for the grammar-guided generation of Large Language Models (LLMs). It supports CFG for Python, Go, Java, JSON, YAML, and many more.\n\n[Mirascope](https:\u002F\u002Fgithub.com\u002FMirascope\u002Fmirascope) (MIT) is an LLM toolkit that supports structured extraction with an intuitive python API.\n\n[Magnetic](https:\u002F\u002Fgithub.com\u002Fjackmpcollins\u002Fmagentic) (MIT) call LLMs from Python using 3 lines of code. Simply use the @prompt decorator to create functions that return structured output from the LLM, powered by Pydantic.\n\n[Formatron](https:\u002F\u002Fgithub.com\u002FDan-wanna-M\u002Fformatron) (MIT) is an efficient and scalable constrained decoding library that enables controlling over language model output format using f-string templates that support regular expressions, context-free grammars, JSON schemas, and Pydantic models. Formatron integrates seamlessly with various model inference libraries.\n\n[Transformers-cfg](https:\u002F\u002Fgithub.com\u002Fepfl-dlab\u002Ftransformers-CFG) (MIT) extends Hugging Face Transformers with context-free grammar (CFG) support via an EBNF interface. It enables grammar-constrained generation with minimal changes to existing code of transformers and supports JSON mode and JSON Schema.\n\n## Blog Articles\n\n[How fast can grammar-structured generation be?](http:\u002F\u002Fblog.dottxt.co\u002Fhow-fast-cfg.html) (2024-04-12, .txt Engineering) demonstrates an almost cost-free method to generate text that follows a grammar. It is shown to outperform `llama.cpp` by a factor of 50x on the C grammar.\n\n[Structured Generation Improves LLM performance: GSM8K Benchmark](https:\u002F\u002Fblog.dottxt.co\u002Fperformance-gsm8k.html) (2024-03-15, .txt Engineering) demonstrates consistent improvements across 8 models, highlighting benefits like \"prompt consistency\" and \"thought-control.\"\n\n[LoRAX + Outlines: Better JSON Extraction with Structured Generation and LoRA](https:\u002F\u002Fpredibase.com\u002Fblog\u002Florax-outlines-better-json-extraction-with-structured-generation-and-lora) (2024-03-03, Predibase Blog) combines Outlines with LoRAX v0.8 to enhance extraction accuracy and schema fidelity through structured generation, fine-tuning, and LoRA adapters.\n\n[FU, Show Me The Prompt. Quickly understand inscrutable LLM frameworks by intercepting API calls](https:\u002F\u002Fhamel.dev\u002Fblog\u002Fposts\u002Fprompt\u002F) (2023-02-14, Hamel Husain) provides a practical guide to intercepting API calls using mitmproxy, gaining insights into tool functionality, and assessing necessity. Emphasizes minimizing complexity and maintaining close connection with underlying LLMs.\n\n[Coalescence: making LLM inference 5x faster](https:\u002F\u002Fblog.dottxt.co\u002Fcoalescence.html) (2024-02-02, .txt Engineering) shows how structured generation can be made faster than unstructured generation using a technique called \"coalescence\", with a caveat regarding how it may affect the quality of the generation.\n\n[Why Pydantic became indispensable for LLMs](https:\u002F\u002Fwww.factsmachine.ai\u002Fp\u002Fhow-pydantic-became-indispensable) (2024-01-19, [Adam Azzam](https:\u002F\u002Ftwitter.com\u002Faaazzam)) explains Pydantic's emergence as a critical tool, enabling sharing data models via JSON schemas and reasoning between unstructured and structured data. Highlights the importance of quantizing the decision space and potential issues with LLMs overfitting to older schema versions.\n\n[Getting Started with Function Calling](https:\u002F\u002Fwww.promptingguide.ai\u002Fapplications\u002Ffunction_calling) (2024-01-11, Elvis Saravia) introduces function calling for connecting LLMs with external tools and APIs, providing an example using OpenAI's API and highlighting potential applications.\n\n[Pushing ChatGPT's Structured Data Support To Its Limits](https:\u002F\u002Fminimaxir.com\u002F2023\u002F12\u002Fchatgpt-structured-data\u002F) (2023-12-21, Max Woolf) delves into leveraging ChatGPT's capabilities using paid API, JSON schemas, and Pydantic. Highlights techniques for improving output quality and the benefits of structured data support.\n\n[Why use Instructor?](https:\u002F\u002Fjxnl.github.io\u002Finstructor\u002Fwhy\u002F) (2023-11-18, Jason Liu) explains the benefits of the library, offering a readable approach, support for partial extraction and various types, and a self-correcting mechanism. Recommends additional resources on the Instructor website.\n\n[Using grammars to constrain llama.cpp output](https:\u002F\u002Fwww.imaurer.com\u002Fllama-cpp-grammars\u002F) (2023-09-06, Ian Maurer) integrates context-free grammars with llama.cpp for more accurate and schema-compliant responses, particularly for biomedical data.\n\n[Using OpenAI functions and their Python library for data extraction](https:\u002F\u002Ftil.simonwillison.net\u002Fgpt3\u002Fopenai-python-functions-data-extraction) (2023-07-09, Simon Willison) demonstrates extracting structured data using OpenAI Python library and function calling in a single API call, with a code example and suggestions for handling streaming limitations.\n\n## Videos\n\n[GPT Extracting Unstructured Data with Datasette and GPT-4 Turbo](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=g3NtJatmQR0) (2024-04-09, Simon Willison) showcases the datasette-extract plugin's ability to populate database tables from unstructured text and images, leveraging GPT-4 Turbo's API for data extraction.\n\n[LLM Structured Output for Function Calling with Ollama](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=_-FrUReljTQ) (2024-03-25, Andrej Baranovskij) demonstrates function calling-based data extraction using Ollama, Instructor and [Sparrow agent](https:\u002F\u002Fgithub.com\u002Fkatanaml\u002Fsparrow). \n\n[Hermes 2 Pro Overview](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=ViXURxck-HM) (2024-03-18, Prompt Engineer) introduces Hermes 2 Pro, a 7B parameter model excelling at function calling and structured JSON output. Demonstrates 90% accuracy in function calling and 84% in JSON mode, outperforming other models.\n\n[Mistral AI Function Calling](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=eOo4GfHj3ZE) (2024-02-24, Sophia Yang) demonstrates connecting LLMs to external tools, generating function arguments, and executing functions. Could be extended to generate or manipulate JSON data.\n\n[Function Calling in Ollama vs OpenAI](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=RXDWkiuXtG0)  (2024-02-13, [Matt Williams](https:\u002F\u002Ftwitter.com\u002FTechnovangelist)) clarifies that models generate structured output for parsing and invoking functions. Compares implementations, highlighting Ollama's simpler approach and using few-shot prompts for consistency.\n\n[LLM Engineering: Structured Outputs](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=1xUeL63ymM0) (2024-02-12, [Jason Liu](https:\u002F\u002Ftwitter.com\u002Fjxnlco), [Weights & Biases Course](https:\u002F\u002Fwww.wandb.courses\u002F)) offers a concise course on handling structured JSON output, function calling, and validations using Pydantic, covering essentials for robust pipelines and efficient production integration.\n\n[Pydantic is all you need](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=yj-wSRJwrrc)  (2023-10-10, [Jason Liu](https:\u002F\u002Ftwitter.com\u002Fjxnlco), [AI Engineer Conference](https:\u002F\u002Fwww.ai.engineer\u002F)) discusses the importance of Pydantic for structured prompting and output validation, introducing the Instructor library and showcasing advanced applications for reliable and maintainable LLM-powered applications.\n\n## Jupyter Notebooks\n\n[Function Calling with llama-cpp-python and OpenAI Python Client](https:\u002F\u002Fgithub.com\u002Fabetlen\u002Fllama-cpp-python\u002Fblob\u002Fmain\u002Fexamples\u002Fnotebooks\u002FFunctions.ipynb) demonstrates integration, including setup using the Instructor library, with examples of retrieving weather information and extracting user details.\n\n[Function Calling with Mistral Models](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fmistralai\u002Fcookbook\u002Fblob\u002Fmain\u002Ffunction_calling.ipynb) demonstrates connecting Mistral models with external tools through a simple example involving a payment transactions dataframe.\n\n[chatgpt-structured-data](https:\u002F\u002Fgithub.com\u002Fminimaxir\u002Fchatgpt-structured-data) by [Max Woolf](https:\u002F\u002Ftwitter.com\u002Fminimaxir) provides demos showcasing ChatGPT's function calling and structured data support, covering various use cases and schemas.## Leaderboards\n\n## Leaderboards\n\n[Berkeley Function-Calling Leaderboard (BFCL)](https:\u002F\u002Fgorilla.cs.berkeley.edu\u002Fblogs\u002F8_berkeley_function_calling_leaderboard.html) is an evaluation framework for LLMs' function-calling capabilities including over 2k question-function-answer pairs across languages like Python, Java, JavaScript, SQL, and REST API, focusing on simple, multiple, and parallel function calls, as well as function relevance detection.\n","# 令人惊叹的 LLM JSON 列表\n\n这个令人惊叹的列表致力于提供使用大型语言模型（LLMs）生成 JSON 或其他结构化输出的相关资源。\n\n## 目录\n\n* [术语](#terminology)  \n* [托管模型](#hosted-models)\n* [本地模型](#local-models)\n* [Python 库](#python-libraries)\n* [博客文章](#blog-articles)\n* [视频](#videos) \n* [Jupyter 笔记本](#jupyter-notebooks)\n* [排行榜](#leaderboards)\n  \n## 术语  \n\n不幸的是，生成 JSON 有几种不同的叫法，但大致意思相同：\n\n* [结构化输出](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Fstructured-outputs)：使用 LLM 生成任何结构化输出，包括 JSON、XML 或 YAML，无论采用何种技术（例如函数调用、引导式生成）。\n* [函数调用](https:\u002F\u002Fwww.promptingguide.ai\u002Fapplications\u002Ffunction_calling)：向 LLM 提供一个假设的（或实际的）函数定义，让其在聊天或完成响应中“调用”该函数。实际上 LLM 并不会真正调用函数，它只是通过 JSON 消息表明应该调用某个函数。\n* [JSON 模式](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Ftext-generation\u002Fjson-mode)：指定 LLM 必须生成有效的 JSON。根据提供商的不同，可能会指定模式，也可能不会，而 LLM 可能会创建意想不到的模式。\n* [工具使用](https:\u002F\u002Fpython.langchain.com\u002Fdocs\u002Fconcepts\u002Ftools\u002F)：为 LLM 提供一系列工具选择，如图像生成、网络搜索以及“函数调用”。API 请求中的函数调用参数现在被称为“tools”。\n* [引导式生成](https:\u002F\u002Farxiv.org\u002Fabs\u002F2307.09702)：用于约束 LLM 模型生成符合预设规范的文本，例如[上下文无关语法](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FContext-free_grammar)。\n* [GPT Actions](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Factions\u002Fintroduction)：ChatGPT 根据 [OpenAPI 规范](https:\u002F\u002Fswagger.io\u002Fspecification\u002F) 中指定的端点和参数来调用操作（即 API 调用）。与名为“Function Calling”的功能不同，此功能确实会调用您托管在 API 服务器上的函数。\n\n这些名称都不太理想，因此我将此列表命名为“令人惊叹的 LLM JSON”。\n\n## 托管模型\n\n| 提供商     | 模型                                                                             | 链接                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n|--------------|------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Anthropic    | claude-3-opus-20240229\u003Cbr>claude-3-sonnet-20240229\u003Cbr>claude-3-haiku-20240307      | [API 文档](https:\u002F\u002Fdocs.anthropic.com\u002Fclaude\u002Fdocs\u002Ftool-use)\u003Cbr>[定价](https:\u002F\u002Fdocs.anthropic.com\u002Fclaude\u002Fdocs\u002Ftool-use)                                                                                                                                                                                                                                                                                                                |\n| AnyScale     | Mistral-7B-Instruct-v0.1\u003Cbr>Mixtral-8x7B-Instruct-v0.1                             | [函数调用](https:\u002F\u002Fdocs.endpoints.anyscale.com\u002Ftext-generation\u002Ffunction-calling)\u003Cbr>[JSON 模式](https:\u002F\u002Fdocs.endpoints.anyscale.com\u002Ftext-generation\u002Fjson-mode)\u003Cbr>[定价](https:\u002F\u002Fdocs.endpoints.anyscale.com\u002Fpricing\u002F)\u003Cbr>[公告（2023 年）](https:\u002F\u002Fwww.anyscale.com\u002Fblog\u002Fanyscale-endpoints-json-mode-and-function-calling-features)                                                                                     |\n| Azure        | gpt-4\u003Cbr>gpt-4-turbo\u003Cbr>gpt-35-turbo\u003Cbr>mistral-large-latest\u003Cbr>mistral-large-2402 | [函数调用](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fazure\u002Fai-services\u002Fopenai\u002Fhow-to\u002Ffunction-calling?tabs=python)\u003Cbr>[OpenAI 定价](https:\u002F\u002Fazure.microsoft.com\u002Fen-us\u002Fpricing\u002Fdetails\u002Fcognitive-services\u002Fopenai-service\u002F#pricing)\u003Cbr>[Mistral 定价](https:\u002F\u002Fazuremarketplace.microsoft.com\u002Fen-us\u002Fmarketplace\u002Fapps\u002F000-000.mistral-ai-large-offer?tab=PlansAndPrice)                                                                |\n| Cohere       | Command-R\u003Cbr>Command-R+                                                            | [函数调用](https:\u002F\u002Fdocs.cohere.com\u002Fdocs\u002Ftool-use)\u003Cbr>[定价](https:\u002F\u002Fcohere.com\u002Fpricing)\u003Cbr>[Command-R（2024-03-11）](https:\u002F\u002Ftxt.cohere.com\u002Fcommand-r\u002F)\u003Cbr>[Command-R+（2024-04-04）](https:\u002F\u002Ftxt.cohere.com\u002Fcommand-r-plus-microsoft-azure\u002F)                                                                                                                                                                                   |\n| Fireworks.ai | firefunction-v1                                                                    | [函数调用](https:\u002F\u002Freadme.fireworks.ai\u002Fdocs\u002Ffunction-calling)\u003Cbr>[JSON 模式](https:\u002F\u002Freadme.fireworks.ai\u002Fdocs\u002Fstructured-response-formatting)\u003Cbr>[语法模式](https:\u002F\u002Freadme.fireworks.ai\u002Fdocs\u002Fstructured-output-grammar-based)\u003Cbr>[定价](https:\u002F\u002Ffireworks.ai\u002Fpricing)\u003Cbr>[公告（2023-12-20）](https:\u002F\u002Fblog.fireworks.ai\u002Ffireworks-raises-the-quality-bar-with-function-calling-model-and-api-release-e7f49d1e98e9) |\n| Google       | gemini-1.0-pro                                                                     | [函数调用](https:\u002F\u002Fcloud.google.com\u002Fvertex-ai\u002Fdocs\u002Fgenerative-ai\u002Fmultimodal\u002Ffunction-calling#rest)\u003Cbr>[定价](https:\u002F\u002Fai.google.dev\u002Fpricing?authuser=1)                                                                                                                                                                                                                                                                        |\n| Groq         | llama2-70b\u003Cbr>mixtral-8x7b\u003Cbr>gemma-7b-it                                          | [函数调用](https:\u002F\u002Fconsole.groq.com\u002Fdocs\u002Ftool-use)\u003Cbr>[定价](https:\u002F\u002Fwow.groq.com\u002F)                                                                                                                                                                                                                                                                                                                                           |\n| Hugging Face TGI         | [众多开源模型](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftext-generation-inference\u002Fsupported_models)                                           | [语法、JSON 模式、函数调用和工具](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftext-generation-inference\u002Fconceptual\u002Fguidance#guidance)\u003Cbr>可[免费本地使用](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftext-generation-inference\u002Fbasic_tutorials\u002Fconsuming_tgi)，或通过[专用](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Finference-endpoints\u002Findex)或[无服务器](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fapi-inference\u002Findex)端点使用。                                                                                                                                                                                                                                                                                                                                             |\n| Mistral      | mistral-large-latest                                                               | [函数调用](https:\u002F\u002Fdocs.mistral.ai\u002Fguides\u002Ffunction-calling\u002F)\u003Cbr>[定价](https:\u002F\u002Fdocs.mistral.ai\u002Fplatform\u002Fpricing\u002F)                                                                                                                                                                                                                                                                                                             |\n| OpenAI       | gpt-4\u003Cbr>gpt-4-turbo\u003Cbr>gpt-35-turbo                                               | [函数调用](https:\u002F\u002Fopenai.com\u002Fblog\u002Fopenai-api\u002F)\u003Cbr>[JSON 模式](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Ftext-generation\u002Fjson-mode)\u003Cbr>[定价](https:\u002F\u002Fopenai.com\u002Fpricing)\u003Cbr>[公告（2023-06-13）](https:\u002F\u002Fopenai.com\u002Fblog\u002Ffunction-calling-and-other-api-updates)                                                                                                                                                        |\n| Rysana       | inversion-sm                                                                       | [API 文档](https:\u002F\u002Frysana.com\u002Fdocs\u002Fapi)\u003Cbr>[定价](https:\u002F\u002Frysana.com\u002Fpricing)\u003Cbr>[公告（2024-03-18）](https:\u002F\u002Frysana.com\u002Finversion)                                                                                                                                                                                                                                                                                            |\n| Together AI  | Mixtral-8x7B-Instruct-v0.1\u003Cbr>Mistral-7B-Instruct-v0.1\u003Cbr>CodeLlama-34b-Instruct   | [函数调用](https:\u002F\u002Fdocs.together.ai\u002Fdocs\u002Ffunction-calling)\u003Cbr>[JSON 模式](https:\u002F\u002Fdocs.together.ai\u002Fdocs\u002Fjson-mode)\u003Cbr>[定价](https:\u002F\u002Ftogether.ai\u002Fpricing\u002F)\u003Cbr>[2024-01-31 公告](https:\u002F\u002Fwww.together.ai\u002Fblog\u002Ffunction-calling-json-mode)                                                                                                                                                                              |\n\n**并行函数调用**\n\n以下是支持多个并行函数调用的托管 API 模型列表。这可能包括同时查询多个城市的天气，或者先查找酒店的位置，再查询该位置的天气。\n\n- anthropic\n\t- claude-3-opus-20240229\n\t- claude-3-sonnet-20240229\n\t- claude-3-haiku-20240307\n- azure\u002Fopenai\n\t- gpt-4-turbo-preview\n\t- gpt-4-1106-preview\n\t- gpt-4-0125-preview\n\t- gpt-3.5-turbo-1106\n\t- gpt-3.5-turbo-0125\n- cohere\n\t- command-r\n- together_ai\n\t- Mixtral-8x7B-Instruct-v0.1\n\t- Mistral-7B-Instruct-v0.1\n\t- CodeLlama-34b-Instruct\n\n\n## 本地模型\n\n[Mistral 7B Instruct v0.3](https:\u002F\u002Fhuggingface.co\u002Fmistralai\u002FMistral-7B-Instruct-v0.3)（2024年5月22日，Apache 2.0 许可）是经过指令微调的 Mistral 版本，增加了函数调用支持。\n\n[C4AI Command R+](https:\u002F\u002Fhuggingface.co\u002FCohereForAI\u002Fc4ai-command-r-plus)（2024年3月20日，CC-BY-NC，Cohere）是一款拥有1040亿参数的多语言模型，具备先进的检索增强生成（RAG）和工具使用能力，专为跨10种语言的推理、摘要和问答任务而优化。支持量化以提高效率，并展示了独特的多步工具集成能力，可用于执行复杂任务。\n\n[Hermes 2 Pro - Mistral 7B](https:\u002F\u002Fhuggingface.co\u002FNousResearch\u002FHermes-2-Pro-Mistral-7B)（2024年3月13日，Nous Research）是一款70亿参数的模型，擅长函数调用、JSON结构化输出以及通用任务。它基于更新的 OpenHermes 2.5 数据集和新的函数调用数据集进行训练，采用了特殊的系统提示和多轮对话结构。在函数调用评估中达到91%，在JSON模式评估中达到84%。\n\n[Gorilla OpenFunctions v2](https:\u002F\u002Fgorilla.cs.berkeley.edu\u002F\u002Fblogs\u002F7_open_functions_v2.html)（2024年2月27日，Apache 2.0 许可，[Charlie Cheng-Jie Ji 等人](https:\u002F\u002Fgorilla.cs.berkeley.edu\u002F\u002Fblogs\u002F7_open_functions_v2.html)）根据 JSON Schema 对象解释并执行函数，支持多种语言，并能检测函数的相关性。\n\n[NexusRaven-V2](https:\u002F\u002Fnexusflow.ai\u002Fblogs\u002Fravenv2)（2023年12月5日，Nexusflow）是一款130亿参数的模型，在零样本函数调用方面比 GPT-4 高出最多7%，能够有效利用软件工具。此外，它还在 CodeLlama-13B-instruct 的基础上进行了进一步的指令微调。\n\n[Functionary](https:\u002F\u002Ffunctionary.meetkai.com\u002F)（2023年8月4日，[MeetKai](https:\u002F\u002Fmeetkai.com\u002F)）根据 JSON Schema 对象解释和执行函数，支持不同的计算需求和调用类型。它与 OpenAI-python 和 llama-cpp-python 兼容，可在 JSON 生成任务中高效执行函数。\n\n[Hugging Face TGI](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftext-generation-inference\u002Fconceptual\u002Fguidance) 为 [多种本地模型](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftext-generation-inference\u002Fsupported_models) 提供 JSON 输出和函数调用功能。\n\n## Python 库\n\n\n[DSPy](https:\u002F\u002Fgithub.com\u002Fstanfordnlp\u002Fdspy)（MIT 许可证）是一个用于算法优化大语言模型提示和权重的框架。DSPy 引入了[类型化预测器和签名](https:\u002F\u002Fgithub.com\u002Fentropy\u002Fdspy\u002Fblob\u002Fmain\u002Fdocs\u002Fdocs\u002Fbuilding-blocks\u002F8-typed_predictors.md)，利用 [Pydantic](https:\u002F\u002Fgithub.com\u002Fpydantic\u002Fpydantic) 对输入和输出强制执行类型约束，从而改进了基于字符串的字段。\n\n[FuzzTypes](https:\u002F\u002Fgithub.com\u002Fgenomoncology\u002FFuzzTypes)（MIT 许可证）在 Pydantic 的基础上扩展了自动更正的注解类型，以增强数据规范化能力，并更好地处理复杂类型，如电子邮件、日期和自定义实体。\n\n[guidance](https:\u002F\u002Fgithub.com\u002Fguidance-ai\u002Fguidance)（Apache-2.0 许可证）支持受限生成，可以将 Python 逻辑与大语言模型调用交织在一起，提供可重用函数并调用外部工具。它还能优化提示，以加快生成速度。\n\n[Instructor](https:\u002F\u002Fgithub.com\u002Fjxnl\u002Finstructor)（MIT 许可证）通过使用函数调用、工具调用和受限采样模式，简化了从大语言模型生成结构化数据的过程。该库基于 Pydantic 进行验证，并支持多种大语言模型。\n\n[LangChain](https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Flangchain)（MIT 许可证）提供了链式接口、与其他工具的集成以及面向应用的链。LangChain 支持跨模型的[结构化输出](https:\u002F\u002Fpython.langchain.com\u002Fdocs\u002Fhow_to\u002Fstructured_output\u002F)和[工具调用](https:\u002F\u002Fpython.langchain.com\u002Fdocs\u002Fhow_to\u002Ftool_calling\u002F)。\n\n[LiteLLM](https:\u002F\u002Fgithub.com\u002FBerriAI\u002Flitellm)（MIT 许可证）简化了以 OpenAI 格式调用 100 多种大语言模型的操作，支持[函数调用](https:\u002F\u002Fdocs.litellm.ai\u002Fdocs\u002Fcompletion\u002Ffunction_call)、工具调用和 JSON 模式。\n\n[LlamaIndex](https:\u002F\u002Fgithub.com\u002Frun-llama\u002Fllama_index)（MIT 许可证）提供了不同抽象层次的[结构化输出模块](https:\u002F\u002Fdocs.llamaindex.ai\u002Fen\u002Fstable\u002Fmodule_guides\u002Fquerying\u002Fstructured_outputs\u002Fstructured_outputs.html)，包括用于文本补全端点的输出解析器、利用函数调用或输出解析将提示映射到结构化输出的[Pydantic 程序](https:\u002F\u002Fdocs.llamaindex.ai\u002Fen\u002Fstable\u002Fmodule_guides\u002Fquerying\u002Fstructured_outputs\u002Fpydantic_program.html)，以及针对特定输出类型的预定义 Pydantic 程序。\n\n[Marvin](https:\u002F\u002Fgithub.com\u002FPrefectHQ\u002Fmarvin)（Apache-2.0 许可证）是一个轻量级工具包，用于构建可靠的自然语言界面，配备自我文档化的工具，适用于实体提取等任务，并支持多模态功能。\n\n[Outlines](https:\u002F\u002Fgithub.com\u002Foutlines-dev\u002Foutlines)（Apache-2.0 许可证）通过使用多种模型、Jinja 模板以及对正则表达式模式、JSON 模式、Pydantic 模型和上下文无关文法的支持，促进了结构化文本的生成。\n\n[Pydantic](https:\u002F\u002Fgithub.com\u002Fpydantic\u002Fpydantic)（MIT 许可证）通过定义数据模型、验证、生成 JSON 模式以及无缝的解析和序列化，简化了对数据结构和 JSON 的操作。\n\n[PydanticAI](https:\u002F\u002Fgithub.com\u002Fpydantic\u002Fpydantic-ai)（MIT 许可证）是一个 Python 代理框架，旨在降低构建生产级生成式 AI 应用程序的难度。\n\n[SGLang](https:\u002F\u002Fgithub.com\u002Fsgl-project\u002Fsglang)（MPL-2.0 许可证）允许使用正则表达式或 Pydantic 模型指定 JSON 模式，以实现受限解码。其高性能运行时能够加速 JSON 解码过程。\n\n[SynCode](https:\u002F\u002Fgithub.com\u002Fuiuc-focal-lab\u002Fsyncode)（MIT 许可证）是一个用于大型语言模型（LLMs）语法引导生成的框架。它支持 Python、Go、Java、JSON、YAML 等多种上下文无关文法。\n\n[Mirascope](https:\u002F\u002Fgithub.com\u002FMirascope\u002Fmirascope)（MIT 许可证）是一个大语言模型工具包，通过直观的 Python API 支持结构化提取。\n\n[Magnetic](https:\u002F\u002Fgithub.com\u002Fjackmpcollins\u002Fmagentic)（MIT 许可证）只需三行代码即可从 Python 调用大语言模型。只需使用 @prompt 装饰器创建函数，即可返回由 Pydantic 驱动的大语言模型生成的结构化输出。\n\n[Formatron](https:\u002F\u002Fgithub.com\u002FDan-wanna-M\u002Fformatron)（MIT 许可证）是一个高效且可扩展的受限解码库，它允许通过 f-string 模板控制语言模型的输出格式，这些模板支持正则表达式、上下文无关文法、JSON 模式和 Pydantic 模型。Formatron 可以无缝集成到各种模型推理库中。\n\n[Transformers-cfg](https:\u002F\u002Fgithub.com\u002Fepfl-dlab\u002Ftransformers-CFG)（MIT 许可证）通过 EBNF 接口扩展了 Hugging Face Transformers，使其支持上下文无关文法（CFG）。它能够在几乎不修改现有代码的情况下实现语法约束下的生成，并支持 JSON 模式和 JSON Schema。\n\n## 博客文章\n\n[语法结构化生成能有多快？](http:\u002F\u002Fblog.dottxt.co\u002Fhow-fast-cfg.html)（2024-04-12，.txt Engineering）展示了一种几乎无成本的、遵循语法规则生成文本的方法。实验表明，在C语言语法测试中，该方法的性能比`llama.cpp`高出50倍。\n\n[结构化生成提升大模型性能：GSM8K基准测试](https:\u002F\u002Fblog.dottxt.co\u002Fperformance-gsm8k.html)（2024-03-15，.txt Engineering）展示了在8个不同模型上的持续改进，强调了“提示一致性”和“思维控制”等优势。\n\n[LoRAX + Outlines：通过结构化生成与LoRA实现更优的JSON提取](https:\u002F\u002Fpredibase.com\u002Fblog\u002Florax-outlines-better-json-extraction-with-structured-generation-and-lora)（2024-03-03，Predibase博客）将Outlines与LoRAX v0.8结合，利用结构化生成、微调和LoRA适配器来提升提取精度和模式保真度。\n\n[FU，给我看看提示。通过拦截API调用快速理解难以捉摸的大模型框架](https:\u002F\u002Fhamel.dev\u002Fblog\u002Fposts\u002Fprompt\u002F)（2023-02-14，Hamel Husain）提供了一份使用mitmproxy拦截API调用的实用指南，帮助深入了解工具功能并评估其必要性。文章强调尽量减少复杂性，并保持与底层大模型的紧密联系。\n\n[凝聚：使大模型推理速度提升5倍](https:\u002F\u002Fblog.dottxt.co\u002Fcoalescence.html)（2024-02-02，.txt Engineering）展示了如何通过一种称为“凝聚”的技术，使结构化生成的速度超过非结构化生成，同时也指出了该技术可能对生成质量产生的影响。\n\n[为什么Pydantic成为大模型不可或缺的工具](https:\u002F\u002Fwww.factsmachine.ai\u002Fp\u002Fhow-pydantic-became-indispensable)（2024-01-19，[Adam Azzam](https:\u002F\u002Ftwitter.com\u002Faaazzam)）解释了Pydantic如何成为关键工具，它能够通过JSON模式共享数据模型，并在非结构化与结构化数据之间进行推理。文章强调了量化决策空间的重要性，以及大模型可能过度拟合旧版本模式所带来的问题。\n\n[函数调用入门](https:\u002F\u002Fwww.promptingguide.ai\u002Fapplications\u002Ffunction_calling)（2024-01-11，Elvis Saravia）介绍了如何通过函数调用将大模型与外部工具及API连接起来，并以OpenAI API为例说明了具体应用。\n\n[将ChatGPT的结构化数据支持推向极限](https:\u002F\u002Fminimaxir.com\u002F2023\u002F12\u002Fchatgpt-structured-data\u002F)（2023-12-21，Max Woolf）深入探讨了如何利用付费API、JSON模式和Pydantic来充分发挥ChatGPT的能力。文章重点介绍了提升输出质量的技术手段，以及结构化数据支持带来的好处。\n\n[为什么要使用Instructor？](https:\u002F\u002Fjxnl.github.io\u002Finstructor\u002Fwhy\u002F)（2023-11-18，Jason Liu）解释了该库的优势，包括易读的接口、对部分提取和多种数据类型的支撑，以及自我纠正机制。同时推荐了Instructor官网上的更多资源。\n\n[使用语法约束lama.cpp的输出](https:\u002F\u002Fwww.imaurer.com\u002Fllama-cpp-grammars\u002F)（2023-09-06，Ian Maurer）将上下文无关语法与lama.cpp集成，以获得更准确且符合模式规范的响应，尤其适用于生物医学数据。\n\n[使用OpenAI函数及其Python库进行数据提取](https:\u002F\u002Ftil.simonwillison.net\u002Fgpt3\u002Fopenai-python-functions-data-extraction)（2023-07-09，Simon Willison）演示了如何利用OpenAI Python库和函数调用，在一次API调用中提取结构化数据，并提供了代码示例及应对流式传输限制的建议。\n\n## 视频\n\n[GPT利用Datasette和GPT-4 Turbo提取非结构化数据](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=g3NtJatmQR0)（2024-04-09，Simon Willison）展示了datasette-extract插件从非结构化文本和图像中填充数据库表的能力，并借助GPT-4 Turbo的API进行数据提取。\n\n[使用Ollama实现大模型结构化输出以进行函数调用](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=_-FrUReljTQ)（2024-03-25，Andrej Baranovskij）演示了如何利用Ollama、Instructor和[Sparrow代理](https:\u002F\u002Fgithub.com\u002Fkatanaml\u002Fsparrow)进行基于函数调用的数据提取。\n\n[Hermes 2 Pro概览](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=ViXURxck-HM)（2024-03-18，Prompt Engineer）介绍了Hermes 2 Pro这一70亿参数模型，它在函数调用和结构化JSON输出方面表现出色。演示显示，其函数调用准确率高达90%，JSON模式下准确率为84%，优于其他模型。\n\n[Mistral AI函数调用](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=eOo4GfHj3ZE)（2024-02-24，Sophia Yang）演示了如何将大模型与外部工具连接，生成函数参数并执行函数。此方法还可扩展用于生成或操作JSON数据。\n\n[Ollama与OpenAI中的函数调用](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=RXDWkiuXtG0)（2024-02-13，[Matt Williams](https:\u002F\u002Ftwitter.com\u002FTechnovangelist)）阐明了模型会生成可解析和调用的结构化输出。他对比了两种实现方式，指出Ollama的方法更为简单，并通过少量示例提示来保证一致性。\n\n[大模型工程：结构化输出](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=1xUeL63ymM0)（2024-02-12，[Jason Liu](https:\u002F\u002Ftwitter.com\u002Fjxnlco)，[Weights & Biases课程](https:\u002F\u002Fwww.wandb.courses\u002F)）提供了一门简明课程，讲解如何使用Pydantic处理结构化JSON输出、函数调用和验证，涵盖了构建稳健流水线和高效生产集成所需的关键内容。\n\n[Pydantic就是你需要的一切](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=yj-wSRJwrrc)（2023-10-10，[Jason Liu](https:\u002F\u002Ftwitter.com\u002Fjxnlco)，[AI工程师大会](https:\u002F\u002Fwww.ai.engineer\u002F)）讨论了Pydantic在结构化提示和输出验证中的重要性，介绍了Instructor库，并展示了其在可靠且易于维护的大模型驱动应用中的高级用法。\n\n## Jupyter笔记本\n\n[使用lama-cpp-python和OpenAI Python客户端进行函数调用](https:\u002F\u002Fgithub.com\u002Fabetlen\u002Fllama-cpp-python\u002Fblob\u002Fmain\u002Fexamples\u002Fnotebooks\u002FFunctions.ipynb)演示了集成过程，包括使用Instructor库进行设置，并提供了获取天气信息和提取用户详情的示例。\n\n[使用Mistral模型进行函数调用](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fmistralai\u002Fcookbook\u002Fblob\u002Fmain\u002Ffunction_calling.ipynb)通过一个简单的支付交易数据框示例，展示了如何将Mistral模型与外部工具连接。\n\n[chatgpt-structured-data](https:\u002F\u002Fgithub.com\u002Fminimaxir\u002Fchatgpt-structured-data)由[Max Woolf](https:\u002F\u002Ftwitter.com\u002Fminimaxir)提供，包含多个演示，展示了ChatGPT的函数调用和结构化数据支持，覆盖了各种用例和模式。## 排行榜\n\n## 排行榜\n\n[伯克利函数调用排行榜（BFCL）](https:\u002F\u002Fgorilla.cs.berkeley.edu\u002Fblogs\u002F8_berkeley_function_calling_leaderboard.html) 是一个用于评估大语言模型函数调用能力的基准测试框架，包含超过2000组问题-函数-答案对，覆盖Python、Java、JavaScript、SQL和REST API等多种编程语言。该榜单重点关注简单调用、多重调用、并行调用以及函数相关性检测等任务。","# Awesome LLM JSON 快速上手指南\n\n`awesome-llm-json` 并非一个单一的软体库或框架，而是一个精选资源列表，旨在帮助开发者利用大语言模型（LLM）生成 JSON 或其他结构化输出。本指南将指导你如何根据该列表中的资源，快速在项目中实现结构化数据生成。\n\n## 环境准备\n\n由于该列表涵盖托管模型（API）和本地模型两种主要路径，请根据你的选择准备相应环境：\n\n### 1. 通用依赖\n无论选择哪种方式，建议准备好以下基础环境：\n*   **操作系统**: Linux, macOS 或 Windows (WSL2 推荐用于本地模型)\n*   **Python**: 3.9 及以上版本\n*   **包管理工具**: `pip` 或 `conda`\n\n### 2. 前置依赖（按场景选择）\n\n#### 方案 A：使用托管模型 (Hosted Models)\n适用于快速集成，无需本地显卡资源。\n*   **API Key**: 注册对应服务商（如 OpenAI, Anthropic, Azure, Together AI 等）并获取 API Key。\n*   **HTTP 客户端**: 推荐使用 `requests` 或官方 SDK。\n    ```bash\n    pip install openai anthropic requests\n    ```\n\n#### 方案 B：使用本地模型 (Local Models)\n适用于数据隐私要求高或离线场景，需要较强的 GPU 资源。\n*   **硬件要求**: 建议 NVIDIA GPU (显存 ≥ 8GB 运行 7B 模型，≥ 24GB 运行更大模型)。\n*   **推理后端**: 推荐使用 `vllm`, `text-generation-inference (TGI)` 或 `Ollama`。\n*   **模型文件**: 从 Hugging Face 下载推荐模型（如 `Hermes 2 Pro - Mistral 7B` 或 `Mistral 7B Instruct v0.3`）。\n    *   *国内加速*: 建议使用 Hugging Face 镜像站 (如 `hf-mirror.com`) 或使用 ModelScope (魔搭社区) 下载模型权重。\n\n## 安装步骤\n\n由于这是一个资源列表，没有统一的安装命令。请根据你的技术栈安装对应的 Python 库或推理引擎。\n\n### 场景 1：通过 Python 调用托管 API (以 OpenAI 兼容接口为例)\n许多列表中的提供商（如 Together AI, Fireworks, Local TGI）都兼容 OpenAI API 格式。\n\n```bash\npip install openai\n```\n\n### 场景 2：本地部署推理引擎 (以 Ollama 为例，最简便的本地方案)\nOllama 支持列表中提到的多种模型（如 Mistral, Llama2, Gemma）。\n\n**macOS \u002F Linux:**\n```bash\ncurl -fsSL https:\u002F\u002Follama.com\u002Finstall.sh | sh\n```\n\n**Windows:**\n前往 [Ollama 官网](https:\u002F\u002Follama.com) 下载安装包。\n\n**拉取支持函数调用的模型 (例如 Hermes 2 Pro):**\n```bash\nollama pull hermes2-pro\n```\n\n## 基本使用\n\n以下是利用列表中的概念（Function Calling \u002F JSON Mode）生成结构化输出的最简单示例。\n\n### 示例 1：使用托管 API 强制输出 JSON (JSON Mode)\n适用于 OpenAI, Together AI, Fireworks 等支持 `response_format` 的提供商。\n\n```python\nfrom openai import OpenAI\n\n# 初始化客户端 (以 Together AI 为例，也可替换为 OpenAI 端点)\nclient = OpenAI(\n    api_key=\"YOUR_API_KEY\",\n    base_url=\"https:\u002F\u002Fapi.together.xyz\u002Fv1\" \n)\n\ncompletion = client.chat.completions.create(\n    model=\"mistralai\u002FMixtral-8x7B-Instruct-v0.1\",\n    messages=[\n        {\"role\": \"system\", \"content\": \"You are a helpful assistant that outputs only valid JSON.\"},\n        {\"role\": \"user\", \"content\": \"Extract the name and age from: 'Alice is 25 years old.'\"}\n    ],\n    response_format={\"type\": \"json_object\"} # 关键参数：强制 JSON 模式\n)\n\nprint(completion.choices[0].message.content)\n# 输出示例: {\"name\": \"Alice\", \"age\": 25}\n```\n\n### 示例 2：使用本地模型进行函数调用 (Function Calling)\n使用 Ollama 运行本地模型模拟工具调用。\n\n```python\nimport ollama\n\nmessages = [\n    {\n        'role': 'user',\n        'content': \"What's the weather like in Beijing today?\"\n    }\n]\n\ntools = [\n    {\n        'type': 'function',\n        'function': {\n            'name': 'get_weather',\n            'description': 'Get the current weather for a specific location',\n            'parameters': {\n                'type': 'object',\n                'properties': {\n                    'location': {\n                        'type': 'string',\n                        'description': 'The city and state, e.g. San Francisco, CA'\n                    }\n                },\n                'required': ['location']\n            }\n        }\n    }\n]\n\nresponse = ollama.chat(model='hermes2-pro', messages=messages, tools=tools)\n\n# 模型将返回一个包含工具调用参数的 JSON 结构，而不是直接回答天气\nif response['message'].get('tool_calls'):\n    print(\"模型请求调用工具:\")\n    print(response['message']['tool_calls'][0]['function'])\n    # 输出示例: {'name': 'get_weather', 'arguments': {'location': 'Beijing'}}\nelse:\n    print(response['message']['content'])\n```\n\n### 示例 3：使用 Guided Generation (本地高级用法)\n如果你使用 `text-generation-inference (TGI)` 或 `Outlines` 库，可以基于上下文无关文法 (CFG) 严格约束输出格式。\n\n```bash\n# 安装 outlines 库\npip install outlines\n```\n\n```python\nimport outlines\nfrom outlines.models import Transformers\n\n# 加载本地模型 (需预先下载)\nmodel = Transformers(\"NousResearch\u002FHermes-2-Pro-Mistral-7B\")\n\n# 定义生成器，强制符合特定 JSON Schema\ngenerator = outlines.generate.json(model, {\"type\": \"object\", \"properties\": {\"id\": {\"type\": \"integer\"}}})\n\nresult = generator(\"Generate a user ID object:\")\nprint(result) \n# 保证输出严格符合 schema，例如: {\"id\": 1024}\n```","某电商公司的数据工程师需要每天从成千上万条非结构化的用户评论中提取商品属性（如颜色、尺寸、材质）并自动存入数据库。\n\n### 没有 awesome-llm-json 时\n- **格式解析频繁报错**：大模型生成的 JSON 经常缺少逗号、引号不闭合或包含多余的解释性文字，导致后端代码解析失败，需编写复杂的正则表达式进行“清洗”。\n- **字段结构不可控**：模型偶尔会自作主张增加或减少字段（例如将\"color\"写成\"colour\"），导致数据入库时因 schema 不匹配而丢失关键信息。\n- **开发调试成本高**：团队需花费大量时间尝试不同的 Prompt 技巧或微调模型，却难以稳定复现完美的结构化输出，严重拖慢项目上线进度。\n- **技术选型迷茫**：面对函数调用、引导生成（Guided Generation）、JSON Mode 等多种术语和实现方案，开发者难以快速找到适合当前本地模型或云服务的最佳实践库。\n\n### 使用 awesome-llm-json 后\n- **输出严格合规**：通过列表中推荐的引导生成库（如 Outlines 或 Instructor），强制模型遵循预定义的 Context-Free Grammar，确保输出的 JSON 100% 合法且无需二次清洗。\n- **Schema 精准映射**：利用清单中适配的工具定义功能，锁定输出字段名称和类型，彻底杜绝字段漂移问题，实现数据无缝流入数据库。\n- **效率显著提升**：直接复用列表中经过验证的 Python 库和 Notebook 模板，将原本数天的调试工作缩短至几小时，快速构建稳定的数据管道。\n- **方案决策清晰**：借助清晰的术语对照表和模型支持清单，团队能迅速根据是用本地小模型还是云端大模型，选定最匹配的技术路径（如 Tool Usage 或 Function Calling）。\n\nawesome-llm-json 的核心价值在于它将分散的结构化生成资源系统化，帮助开发者从“与模型格式博弈”转向“专注业务逻辑落地”，极大提升了非结构化数据处理的稳定性与效率。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fimaurer_awesome-llm-json_25a0149b.png","imaurer","Ian Maurer","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fimaurer_12f0c2b1.png","CTO, GenomOncology, LLC\r\ngenomoncology.com","@genomoncology ","Cleveland, OH",null,"https:\u002F\u002Fimaurer.com\u002F","https:\u002F\u002Fgithub.com\u002Fimaurer",2168,91,"2026-04-13T17:26:13","MIT",1,"","未说明",{"notes":89,"python":87,"dependencies":90},"该仓库是一个资源列表（Awesome List），用于整理支持生成 JSON 或结构化输出的大语言模型（LLM）、API 提供商、Python 库及相关文章，本身不是一个可运行的软件工具，因此没有具体的操作系统、GPU、内存或依赖库要求。具体运行需求取决于用户选择的特定模型（如本地部署的 Mistral 7B 需显存约 6-8GB）或调用的云端 API。",[],[13,14,35],[93,94,95,96,97,98],"awesome-list","large-language-models","llm","function-calling","gpt-actions","structured-generation","2026-03-27T02:49:30.150509","2026-04-16T01:51:42.789744",[],[]]