[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FA9KTVARM8WQ5SFQ2S52W3":3,"skill-same:01M7FA9KTVARM8WQ5SFQ2S52W3":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":48},"01M7FA9KTVARM8WQ5SFQ2S52W3","knowledge-base-and-api",null,"Use Langchain-Chatchat FastAPI, OpenAI-compatible chat, knowledge-base RAG, file RAG, tools, and vector-store workflows.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Flangchain-chatchat\u002Fsub-skills\u002Fknowledge-base-and-api\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: knowledge-base-and-api\ndescription: \"Use Langchain-Chatchat FastAPI, OpenAI-compatible chat,\n  knowledge-base RAG, file RAG, tools, and vector-store workflows.\"\ndisable-model-invocation: true\nmetadata:\n  disco-role: operating\nlicense: Apache 2.0\n---\n\n# Knowledge Base and API\n\nUse this sub-skill when a task asks for Langchain-Chatchat HTTP APIs, RAG modes, knowledge-base document operations, file\u002Ftemp KB chat, search-engine chat, tools, OpenAI-compatible endpoints, route discovery, or vector-store behavior.\n\n## Read first\n\n- [`references\u002Fapi-reference.md`](references\u002Fapi-reference.md) maps verified route families and request patterns.\n- [`references\u002Frag-workflows.md`](references\u002Frag-workflows.md) covers local KB, temp-file, search-engine, direct retrieval, and tool-choice workflows.\n- [`references\u002Fvector-store-and-data-formats.md`](references\u002Fvector-store-and-data-formats.md) covers document\u002Fvector-store settings and supported backends.\n- [`references\u002Ftroubleshooting.md`](references\u002Ftroubleshooting.md) covers route, provider, streaming, KB, and vector-store failures.\n- Run [`scripts\u002Fapi_surface_probe.py`](scripts\u002Fapi_surface_probe.py) to list the installed API routes without binding a service port.\n\n## Preconditions\n\n1. `langchain-chatchat` is installed and imports.\n2. `CHATCHAT_ROOT` has been initialized with `chatchat init`.\n3. API server is running for live HTTP calls: `chatchat start --api` or `chatchat start -a`.\n4. Model provider settings are valid for any route that invokes LLMs or embeddings.\n5. For vector rebuilds or retrieval over indexed docs, the embedding model is reachable.\n\nIf any precondition is false, route setup\u002Fconfig work to [`..\u002Fserver-setup-and-cli\u002FSKILL.md`](..\u002Fserver-setup-and-cli\u002FSKILL.md).\n\n## Route families\n\n| Task | Route family |\n| --- | --- |\n| Unified chat, pure LLM chat, agent\u002Ftool chat | `\u002Fchat\u002Fchat\u002Fcompletions` |\n| Legacy\u002Fspecific KB and file chat helpers | `\u002Fchat\u002Fkb_chat`, `\u002Fchat\u002Ffile_chat` |\n| OpenAI-compatible RAG by mode | `\u002Fknowledge_base\u002F{local_kb|temp_kb|search_engine}\u002F{param}\u002Fchat\u002Fcompletions` |\n| KB CRUD and document operations | `\u002Fknowledge_base\u002Flist_knowledge_bases`, `\u002Fcreate_knowledge_base`, `\u002Fdelete_knowledge_base`, `\u002Flist_files`, `\u002Fupload_docs`, `\u002Fdelete_docs`, `\u002Fupdate_docs`, `\u002Fsearch_docs`, `\u002Fdownload_doc`, `\u002Frecreate_vector_store` |\n| Temp docs | `\u002Fknowledge_base\u002Fupload_temp_docs`, `\u002Fsearch_temp_docs` |\n| Summary routes | `\u002Fknowledge_base\u002Fkb_summary_api\u002F*` |\n| Tool registry\u002Fcalls | `\u002Ftools`, `\u002Ftools\u002Fcall` |\n| OpenAI-compatible provider proxy | `\u002Fv1\u002Fmodels`, `\u002Fv1\u002Fchat\u002Fcompletions`, `\u002Fv1\u002Fcompletions`, `\u002Fv1\u002Fembeddings`, `\u002Fv1\u002Fimages\u002F*`, `\u002Fv1\u002Faudio\u002F*`, `\u002Fv1\u002Ffiles*` |\n| Server state\u002Fprompts | `\u002Fserver\u002Fconfigs`, `\u002Fserver\u002Fget_prompt_template` |\n| MCP connections | `\u002Fapi\u002Fv1\u002Fmcp_connections\u002F*` |\n\n## Common API patterns\n\n### Direct retrieval from local KB without LLM generation\n\nUse OpenAI-compatible RAG route plus `return_direct=True` in `extra_body` when the task only needs retrieved documents.\n\n```python\nfrom openai import Client\n\nclient = Client(base_url=\"http:\u002F\u002F127.0.0.1:7861\u002Fknowledge_base\u002Flocal_kb\u002Fsamples\", api_key=\"EMPTY\")\nresp = client.chat.completions.create(\n    model=\"configured-llm-name\",\n    messages=[{\"role\": \"user\", \"content\": \"How do I ask high-quality questions?\"}],\n    stream=True,\n    extra_body={\"top_k\": 3, \"score_threshold\": 2.0, \"return_direct\": True},\n)\nfor chunk in resp:\n    print(chunk)\n```\n\n### Tool-assisted chat\n\nFetch `\u002Ftools` first. If the model can choose tools, pass `tools`. If it cannot reliably infer arguments, pass `tool_choice` and `extra_body.tool_input` to make the tool call explicit.\n\n### File\u002Ftemp KB chat\n\nUpload temporary docs first, capture `knowledge_id`, then use `\u002Fknowledge_base\u002Ftemp_kb\u002F{knowledge_id}\u002Fchat\u002Fcompletions` or the SDK's temp-doc methods.\n\n## Verification boundaries\n\n- `api_surface_probe.py` verifies installed route registration only; it does not prove the API server, provider, or models are running.\n- A `return_direct=True` RAG route still needs retrieval inputs and often an initialized vector store, but it avoids LLM answer generation.\n- Live `\u002Fv1\u002Fmodels` depends on provider configuration; failures there are often provider setup failures, not route-definition failures.\n","# Knowledge Base and API\n\nUse this sub-skill when a task asks for Langchain-Chatchat HTTP APIs, RAG modes, knowledge-base document operations, file\u002Ftemp KB chat, search-engine chat, tools, OpenAI-compatible endpoints, route discovery, or vector-store behavior.\n\n## Read first\n\n- [`references\u002Fapi-reference.md`](references\u002Fapi-reference.md) maps verified route families and request patterns.\n- [`references\u002Frag-workflows.md`](references\u002Frag-workflows.md) covers local KB, temp-file, search-engine, direct retrieval, and tool-choice workflows.\n- [`references\u002Fvector-store-and-data-formats.md`](references\u002Fvector-store-and-data-formats.md) covers document\u002Fvector-store settings and supported backends.\n- [`references\u002Ftroubleshooting.md`](references\u002Ftroubleshooting.md) covers route, provider, streaming, KB, and vector-store failures.\n- Run [`scripts\u002Fapi_surface_probe.py`](scripts\u002Fapi_surface_probe.py) to list the installed API routes without binding a service port.\n\n## Preconditions\n\n1. `langchain-chatchat` is installed and imports.\n2. `CHATCHAT_ROOT` has been initialized with `chatchat init`.\n3. API server is running for live HTTP calls: `chatchat start --api` or `chatchat start -a`.\n4. Model provider settings are valid for any route that invokes LLMs or embeddings.\n5. For vector rebuilds or retrieval over indexed docs, the embedding model is reachable.\n\nIf any precondition is false, route setup\u002Fconfig work to [`..\u002Fserver-setup-and-cli\u002FSKILL.md`](..\u002Fserver-setup-and-cli\u002FSKILL.md).\n\n## Route families\n\n| Task | Route family |\n| --- | --- |\n| Unified chat, pure LLM chat, agent\u002Ftool chat | `\u002Fchat\u002Fchat\u002Fcompletions` |\n| Legacy\u002Fspecific KB and file chat helpers | `\u002Fchat\u002Fkb_chat`, `\u002Fchat\u002Ffile_chat` |\n| OpenAI-compatible RAG by mode | `\u002Fknowledge_base\u002F{local_kb|temp_kb|search_engine}\u002F{param}\u002Fchat\u002Fcompletions` |\n| KB CRUD and document operations | `\u002Fknowledge_base\u002Flist_knowledge_bases`, `\u002Fcreate_knowledge_base`, `\u002Fdelete_knowledge_base`, `\u002Flist_files`, `\u002Fupload_docs`, `\u002Fdelete_docs`, `\u002Fupdate_docs`, `\u002Fsearch_docs`, `\u002Fdownload_doc`, `\u002Frecreate_vector_store` |\n| Temp docs | `\u002Fknowledge_base\u002Fupload_temp_docs`, `\u002Fsearch_temp_docs` |\n| Summary routes | `\u002Fknowledge_base\u002Fkb_summary_api\u002F*` |\n| Tool registry\u002Fcalls | `\u002Ftools`, `\u002Ftools\u002Fcall` |\n| OpenAI-compatible provider proxy | `\u002Fv1\u002Fmodels`, `\u002Fv1\u002Fchat\u002Fcompletions`, `\u002Fv1\u002Fcompletions`, `\u002Fv1\u002Fembeddings`, `\u002Fv1\u002Fimages\u002F*`, `\u002Fv1\u002Faudio\u002F*`, `\u002Fv1\u002Ffiles*` |\n| Server state\u002Fprompts | `\u002Fserver\u002Fconfigs`, `\u002Fserver\u002Fget_prompt_template` |\n| MCP connections | `\u002Fapi\u002Fv1\u002Fmcp_connections\u002F*` |\n\n## Common API patterns\n\n### Direct retrieval from local KB without LLM generation\n\nUse OpenAI-compatible RAG route plus `return_direct=True` in `extra_body` when the task only needs retrieved documents.\n\n```python\nfrom openai import Client\n\nclient = Client(base_url=\"http:\u002F\u002F127.0.0.1:7861\u002Fknowledge_base\u002Flocal_kb\u002Fsamples\", api_key=\"EMPTY\")\nresp = client.chat.completions.create(\n    model=\"configured-llm-name\",\n    messages=[{\"role\": \"user\", \"content\": \"How do I ask high-quality questions?\"}],\n    stream=True,\n    extra_body={\"top_k\": 3, \"score_threshold\": 2.0, \"return_direct\": True},\n)\nfor chunk in resp:\n    print(chunk)\n```\n\n### Tool-assisted chat\n\nFetch `\u002Ftools` first. If the model can choose tools, pass `tools`. If it cannot reliably infer arguments, pass `tool_choice` and `extra_body.tool_input` to make the tool call explicit.\n\n### File\u002Ftemp KB chat\n\nUpload temporary docs first, capture `knowledge_id`, then use `\u002Fknowledge_base\u002Ftemp_kb\u002F{knowledge_id}\u002Fchat\u002Fcompletions` or the SDK's temp-doc methods.\n\n## Verification boundaries\n\n- `api_surface_probe.py` verifies installed route registration only; it does not prove the API server, provider, or models are running.\n- A `return_direct=True` RAG route still needs retrieval inputs and often an initialized vector store, but it avoids LLM answer generation.\n- Live `\u002Fv1\u002Fmodels` depends on provider configuration; failures there are often provider setup failures, not route-definition failures.\n",{"name":5,"license":24,"metadata":25,"description":7,"disable-model-invocation":27},"Apache 2.0",{"disco-role":26},"operating",true,"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","06-前端与设计\u002Flangchain-chatchat\u002Fsub-skills\u002Fknowledge-base-and-api",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":27},[38,41,44],{"tool":39,"command":40},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill knowledge-base-and-api",{"tool":42,"command":43},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill knowledge-base-and-api",{"tool":45,"command":46},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill knowledge-base-and-api","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Flangchain-chatchat\u002Fsub-skills\u002Fknowledge-base-and-api\u002FSKILL.md",[49,55,59,63],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Fapi-reference.md","REFERENCE","参考文档",4363,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Flangchain-chatchat\u002Fsub-skills\u002Fknowledge-base-and-api\u002Freferences\u002Fapi-reference.md",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Frag-workflows.md",3122,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Flangchain-chatchat\u002Fsub-skills\u002Fknowledge-base-and-api\u002Freferences\u002Frag-workflows.md",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Ftroubleshooting.md",3781,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Flangchain-chatchat\u002Fsub-skills\u002Fknowledge-base-and-api\u002Freferences\u002Ftroubleshooting.md",{"path":64,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fvector-store-and-data-formats.md",3196,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Flangchain-chatchat\u002Fsub-skills\u002Fknowledge-base-and-api\u002Freferences\u002Fvector-store-and-data-formats.md",[68,76,81,88,95,102],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":77,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]