feat: 新增 QMDSearch Agent Skill 包与下载入口
- 新增 skills/qmdsearch-agent(SKILL.md + references/api-examples.md),文档化 AI Agent 鉴权、文本/文件上传入库(异步轮询)与分层检索调用方式 - 打包 QMDSearch-Agent-Skill.zip 至 app/static/agent-skill/ - 后端新增 GET /agent-skill 免登录下载路由(随 ./app 卷挂载,restart 即生效) - 前端 API 说明页新增「AI Agent Skill 下载」卡片,链接至 /agent-skill
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup>
|
||||
import { computed } from 'vue'
|
||||
import { ApiOutlined, SafetyCertificateOutlined, CodeOutlined } from '@ant-design/icons-vue'
|
||||
import { ApiOutlined, SafetyCertificateOutlined, CodeOutlined, DownloadOutlined } from '@ant-design/icons-vue'
|
||||
|
||||
// 以下内容整理自项目 README.md 的「API 文档」章节
|
||||
const apiList = [
|
||||
@@ -29,6 +29,8 @@ const methodColor = {
|
||||
|
||||
const baseUrl = computed(() => `${window.location.origin}/admin/`.replace(/\/admin\/$/, ''))
|
||||
|
||||
const agentSkillUrl = computed(() => `${window.location.origin}/agent-skill`)
|
||||
|
||||
const loginExample = `curl -X POST ${baseUrl.value}/api/v1/auth/login \\
|
||||
-H "Content-Type: application/json" \\
|
||||
-d '{"username": "admin", "password": "your-password"}'`
|
||||
@@ -59,6 +61,23 @@ const uploadExample = `curl -X POST ${baseUrl.value}/api/v1/documents/upload \\
|
||||
message="需要鉴权的接口请在请求头携带 Authorization: Bearer <token>,token 通过 /auth/login 获取。"
|
||||
/>
|
||||
|
||||
<!-- AI Agent Skill 下载 -->
|
||||
<section class="apidocs__block apidocs__skill">
|
||||
<h3 class="section-subtitle">
|
||||
<DownloadOutlined /> AI Agent Skill 下载
|
||||
</h3>
|
||||
<p class="apidocs__p">
|
||||
为 AI Agent 提供的接入包(含 <code>SKILL.md</code> 与 Python 客户端示例),覆盖文档上传(文本 / 文件)与分层检索。
|
||||
下载后解压到 Agent 的 skills 目录即可启用。
|
||||
</p>
|
||||
<a :href="agentSkillUrl" target="_blank" rel="noopener">
|
||||
<a-button type="primary">
|
||||
<template #icon><DownloadOutlined /></template>
|
||||
下载 QMDSearch-Agent-Skill.zip
|
||||
</a-button>
|
||||
</a>
|
||||
</section>
|
||||
|
||||
<!-- 统一响应格式 -->
|
||||
<section class="apidocs__block">
|
||||
<h3 class="section-subtitle">
|
||||
@@ -152,6 +171,13 @@ const uploadExample = `curl -X POST ${baseUrl.value}/api/v1/documents/upload \\
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.apidocs__skill {
|
||||
padding: 16px 18px;
|
||||
border: 1px solid rgba(22, 119, 255, 0.25);
|
||||
border-radius: 10px;
|
||||
background: rgba(22, 119, 255, 0.04);
|
||||
}
|
||||
|
||||
.apidocs__block {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user