refactor: 项目更名 WeKnora → Academy
Build & Publish (dsh-academy) / End-to-end inside dsh (latest, advisory) (push) Skipped
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Frontend / Docker multi-stage image (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-academy) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-academy) / Publish to npm (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Helm / chart (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (latest, advisory) (push) Skipped
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Frontend / Docker multi-stage image (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-academy) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-academy) / Publish to npm (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Helm / chart (push) Canceled after 0s
- 全量替换代码/配置/文档中的项目名(保留上游 GitHub 链接、weixin 文档域名、Docker Hub 镜像名) - 重命名 32 个含项目名的文件/目录;Go module 路径改为 academy(含 client/cli 子模块) - docreader proto 描述符采用等长替换,保持序列化字节布局有效 - Dockerfile.app 构建网络修复: browserskill 离线产物通道、PyPI/apt 国内镜像 - 运行验证: go build ✓ docker compose up ✓ 健康检查 ✓
This commit is contained in:
1 parent
9097ee699d
commit
9058149576
3136 files changed
+18018
-18004
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# API 参考:模型与初始化
|
||||
|
||||
管理模型、测试连接、初始化知识库,并发起评估任务。WeKnoraCloud 接口用于相关云服务接入。
|
||||
管理模型、测试连接、初始化知识库,并发起评估任务。AcademyCloud 接口用于相关云服务接入。
|
||||
|
||||
系统信息与系统管理(`/system`、`/system/admin`)接口见[系统与平台管理](./02-api-system.md)。
|
||||
|
||||
@@ -59,7 +59,7 @@ curl "$BASE/api/v1/models/catalog/resolve?provider=deepseek&model=deepseek-v4-pr
|
||||
|
||||
自部署的 `generic` / `Qwen3-VL-Embedding` 默认通过二维 `messages` 批量提交独立输入(已验证 vLLM 0.29.0);单条输入保留一维会话格式。文本沿用 `BATCH_EMBED_SIZE` 分批,图片批量调用的默认上限为 5 张,这是客户端的保守分批设置,可通过 `parameters.spec.compat.max_image_batch_size` 调整。上传解析仍按单张图片调度任务,不会跨任务合并图片。旧版服务若不支持二维 `messages`,可设置 `parameters.spec.compat.batch_messages=false` 恢复逐条请求;WeMM-Embedding 预设也默认启用会话批处理;其他没有该预设的模型需显式启用。
|
||||
|
||||
批处理保持各输入的会话内容和向量索引映射,但不保证服务端跨批大小计算逐位相同。要求严格可复现时,应验证部署端的数值行为;vLLM 的 [Batch Invariance](https://docs.vllm.ai/en/v0.29.0/features/batch_invariance/) 模式需要在服务端启用,并针对实际模型验证。可设置 `WEKNORA_EMBEDDING_TEST_URL` 和 `WEKNORA_EMBEDDING_TEST_FIXTURE` 后运行 `go test ./internal/models/embedding -run '^TestLiveQwenMessagesBatchParity$' -v -count=1`:fixture 为 `{"texts":[...],"image_paths":[...]}`,文本和图片均至少两个;私有/IP 端点需配置 `SSRF_WHITELIST`,鉴权可使用 `WEKNORA_EMBEDDING_TEST_API_KEY`。该测试比较逐条、分批、倒序和重复逐条请求,记录最大绝对误差与最低余弦相似度,超过严格阈值会失败,不写入知识库。
|
||||
批处理保持各输入的会话内容和向量索引映射,但不保证服务端跨批大小计算逐位相同。要求严格可复现时,应验证部署端的数值行为;vLLM 的 [Batch Invariance](https://docs.vllm.ai/en/v0.29.0/features/batch_invariance/) 模式需要在服务端启用,并针对实际模型验证。可设置 `ACADEMY_EMBEDDING_TEST_URL` 和 `ACADEMY_EMBEDDING_TEST_FIXTURE` 后运行 `go test ./internal/models/embedding -run '^TestLiveQwenMessagesBatchParity$' -v -count=1`:fixture 为 `{"texts":[...],"image_paths":[...]}`,文本和图片均至少两个;私有/IP 端点需配置 `SSRF_WHITELIST`,鉴权可使用 `ACADEMY_EMBEDDING_TEST_API_KEY`。该测试比较逐条、分批、倒序和重复逐条请求,记录最大绝对误差与最低余弦相似度,超过严格阈值会失败,不写入知识库。
|
||||
|
||||
响应:201 `{"success":true,"data":{ModelResponse}}`(`id,name,type,source,parameters,is_default,is_builtin,status,credentials,capabilities,...`;响应不含密钥)
|
||||
|
||||
@@ -188,29 +188,29 @@ curl -X PUT $BASE/api/v1/models/m-1/credentials -H "Authorization: Bearer $TOKEN
|
||||
curl -X DELETE $BASE/api/v1/models/m-1/credentials/api_key -H "Authorization: Bearer $TOKEN"
|
||||
```
|
||||
|
||||
## WeKnoraCloud
|
||||
## AcademyCloud
|
||||
|
||||
Handler: `internal/handler/weknoracloud.go`。API key:`manage_models`/full。
|
||||
Handler: `internal/handler/academycloud.go`。API key:`manage_models`/full。
|
||||
|
||||
### POST /api/v1/weknoracloud/credentials
|
||||
### POST /api/v1/academycloud/credentials
|
||||
|
||||
用途:保存 WeKnoraCloud SaaS 凭证。权限:Admin+。请求体:`{"app_id":"...","app_secret":"..."}`(均 `binding:"required"`)。
|
||||
用途:保存 AcademyCloud SaaS 凭证。权限:Admin+。请求体:`{"app_id":"...","app_secret":"..."}`(均 `binding:"required"`)。
|
||||
|
||||
响应:200 `{"success":true,"message":"凭证保存成功"}`
|
||||
|
||||
```bash
|
||||
curl -X POST $BASE/api/v1/weknoracloud/credentials -H "Authorization: Bearer $TOKEN" \
|
||||
curl -X POST $BASE/api/v1/academycloud/credentials -H "Authorization: Bearer $TOKEN" \
|
||||
-H 'Content-Type: application/json' -d '{"app_id":"app","app_secret":"secret"}'
|
||||
```
|
||||
|
||||
### GET /api/v1/models/weknoracloud/status
|
||||
### GET /api/v1/models/academycloud/status
|
||||
|
||||
用途:WeKnoraCloud 就绪状态探测。权限:Viewer+。
|
||||
用途:AcademyCloud 就绪状态探测。权限:Viewer+。
|
||||
|
||||
响应:200 服务状态对象。
|
||||
|
||||
```bash
|
||||
curl $BASE/api/v1/models/weknoracloud/status -H "Authorization: Bearer $TOKEN"
|
||||
curl $BASE/api/v1/models/academycloud/status -H "Authorization: Bearer $TOKEN"
|
||||
```
|
||||
|
||||
## 初始化(/api/v1/initialization)
|
||||
@@ -437,4 +437,4 @@ curl "$BASE/api/v1/evaluation?task_id=task-1" -H "Authorization: Bearer $TOKEN"
|
||||
|
||||
## 实现参考
|
||||
|
||||
路由注册:`internal/router/router.go` 调用 `RegisterModelRoutes`、`RegisterInitializationRoutes`、`RegisterEvaluationRoutes`、`RegisterWeKnoraCloudRoutes`(定义在 `internal/router/routes_infra.go`)。Handler:`internal/handler/model.go`、`internal/handler/model_catalog.go`、`internal/handler/model_credentials.go`、`internal/handler/initialization.go`、`internal/handler/evaluation.go`、`internal/handler/weknoracloud.go`。
|
||||
路由注册:`internal/router/router.go` 调用 `RegisterModelRoutes`、`RegisterInitializationRoutes`、`RegisterEvaluationRoutes`、`RegisterAcademyCloudRoutes`(定义在 `internal/router/routes_infra.go`)。Handler:`internal/handler/model.go`、`internal/handler/model_catalog.go`、`internal/handler/model_credentials.go`、`internal/handler/initialization.go`、`internal/handler/evaluation.go`、`internal/handler/academycloud.go`。
|
||||
Reference in new issue
Block a user