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

- 全量替换代码/配置/文档中的项目名(保留上游 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:
runny committed 2026-11-13 20:52:51 +08:00
1 parent 9097ee699d
commit 9058149576
3136 files changed
+18018 -18004

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ import (
"strconv"
"sync"
"github.com/Tencent/WeKnora/internal/models/utils"
"academy/internal/models/utils"
"github.com/panjf2000/ants/v2"
)
@@ -6,8 +6,8 @@ import (
"strings"
"testing"
modelruntime "github.com/Tencent/WeKnora/internal/models/runtime"
"github.com/Tencent/WeKnora/internal/types"
modelruntime "academy/internal/models/runtime"
"academy/internal/types"
"github.com/stretchr/testify/require"
)
@@ -3,7 +3,7 @@ package embedding
import (
"context"
"github.com/Tencent/WeKnora/internal/models/limiter"
"academy/internal/models/limiter"
)
// Embedding is the highest-volume background model call: document ingestion
@@ -7,8 +7,8 @@ import (
"testing"
"time"
"github.com/Tencent/WeKnora/internal/models/limiter"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/models/limiter"
"academy/internal/types"
"github.com/panjf2000/ants/v2"
)
@@ -3,7 +3,7 @@ package embedding
import (
"testing"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
)
func TestConfigFromModel(t *testing.T) {
+7 -7
View File
@@ -6,12 +6,12 @@ import (
"fmt"
"strings"
"github.com/Tencent/WeKnora/internal/logger"
"github.com/Tencent/WeKnora/internal/models/api"
"github.com/Tencent/WeKnora/internal/models/imageprep"
"github.com/Tencent/WeKnora/internal/models/utils/ollama"
"github.com/Tencent/WeKnora/internal/tracing/langfuse"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/logger"
"academy/internal/models/api"
"academy/internal/models/imageprep"
"academy/internal/models/utils/ollama"
"academy/internal/tracing/langfuse"
"academy/internal/types"
)
// Embedder defines the interface for text vectorization
@@ -116,7 +116,7 @@ type Config struct {
// ConfigFromModel 根据 types.Model 构造 embedding.Config。
// 生产路径(从 DB 拉起)和测试连接路径(临时表单)共享这份映射。
// appID / appSecret 是已解密的 WeKnoraCloud 凭证,调用方负责传入。
// appID / appSecret 是已解密的 AcademyCloud 凭证,调用方负责传入。
func ConfigFromModel(m *types.Model, appID, appSecret string) Config {
if m == nil {
return Config{}
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"errors"
"testing"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -3,7 +3,7 @@ package embedding
import (
"context"
"github.com/Tencent/WeKnora/internal/tracing/langfuse"
"academy/internal/tracing/langfuse"
)
// langfuseEmbedder wraps an Embedder and reports each call as a Langfuse
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"strings"
"time"
"github.com/Tencent/WeKnora/internal/logger"
"academy/internal/logger"
)
// debugEmbedder wraps an Embedder with LLM debug logging.
@@ -9,8 +9,8 @@ import (
"testing"
"time"
"github.com/Tencent/WeKnora/internal/models/imageprep"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/models/imageprep"
"academy/internal/types"
"github.com/panjf2000/ants/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -19,15 +19,15 @@ import (
// Opt-in integration check against an operator-selected Qwen3-VL endpoint.
// The fixture contains {"texts":[...],"image_paths":[...]} and stays outside
// the repository. This only calls the embedding model; it never writes an index.
// WEKNORA_EMBEDDING_TEST_URL is the base URL including /v1.
// ACADEMY_EMBEDDING_TEST_URL is the base URL including /v1.
// Private/IP endpoints need the usual explicit SSRF_WHITELIST setting.
// A server without batch-invariant computation can fail the strict numerical
// bounds below even when it accepts the batch and returns correctly ordered vectors.
func TestLiveQwenMessagesBatchParity(t *testing.T) {
base := os.Getenv("WEKNORA_EMBEDDING_TEST_URL")
fixture := os.Getenv("WEKNORA_EMBEDDING_TEST_FIXTURE")
base := os.Getenv("ACADEMY_EMBEDDING_TEST_URL")
fixture := os.Getenv("ACADEMY_EMBEDDING_TEST_FIXTURE")
if base == "" || fixture == "" {
t.Skip("set WEKNORA_EMBEDDING_TEST_URL and WEKNORA_EMBEDDING_TEST_FIXTURE for live parity checks")
t.Skip("set ACADEMY_EMBEDDING_TEST_URL and ACADEMY_EMBEDDING_TEST_FIXTURE for live parity checks")
}
var inputs struct {
Texts []string `json:"texts"`
@@ -44,7 +44,7 @@ func TestLiveQwenMessagesBatchParity(t *testing.T) {
defer pool.Release()
config := Config{
Source: types.ModelSourceRemote, Provider: "generic", ModelName: "Qwen/Qwen3-VL-Embedding-8B",
BaseURL: base, APIKey: os.Getenv("WEKNORA_EMBEDDING_TEST_API_KEY"), Dimensions: 4096,
BaseURL: base, APIKey: os.Getenv("ACADEMY_EMBEDDING_TEST_API_KEY"), Dimensions: 4096,
}
batched, err := NewEmbedder(config, NewBatchEmbedder(pool), nil)
require.NoError(t, err)
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"fmt"
"time"
"github.com/Tencent/WeKnora/internal/logger"
"github.com/Tencent/WeKnora/internal/models/utils/ollama"
"academy/internal/logger"
"academy/internal/models/utils/ollama"
ollamaapi "github.com/ollama/ollama/api"
)
+8 -8
View File
@@ -6,14 +6,14 @@ import (
"strings"
"time"
"github.com/Tencent/WeKnora/internal/models/api"
"github.com/Tencent/WeKnora/internal/models/api/arkembeddings"
"github.com/Tencent/WeKnora/internal/models/api/dashscopeembeddings"
"github.com/Tencent/WeKnora/internal/models/api/googleembeddings"
"github.com/Tencent/WeKnora/internal/models/api/openaiembeddings"
"github.com/Tencent/WeKnora/internal/models/imageprep"
modelruntime "github.com/Tencent/WeKnora/internal/models/runtime"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/models/api"
"academy/internal/models/api/arkembeddings"
"academy/internal/models/api/dashscopeembeddings"
"academy/internal/models/api/googleembeddings"
"academy/internal/models/api/openaiembeddings"
"academy/internal/models/imageprep"
modelruntime "academy/internal/models/runtime"
"academy/internal/types"
)
// retryPolicy is the transport-error retry budget; tests shorten it.
+4 -4
View File
@@ -11,9 +11,9 @@ import (
"testing"
"time"
"github.com/Tencent/WeKnora/internal/models/api"
"github.com/Tencent/WeKnora/internal/models/limiter"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/models/api"
"academy/internal/models/limiter"
"academy/internal/types"
"github.com/panjf2000/ants/v2"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -56,7 +56,7 @@ func TestUnreachableUpstreamIsAnErrorForEveryProtocol(t *testing.T) {
// and fail at the far end with a less useful error.
func TestSignedVendorNeedsItsIdentityPair(t *testing.T) {
_, err := newEmbedder(Config{
Source: types.ModelSourceRemote, Provider: "weknoracloud",
Source: types.ModelSourceRemote, Provider: "academycloud",
BaseURL: "https://weknora.weixin.qq.com", ModelName: "m", AppSecret: "s",
}, nil, nil)
require.Error(t, err)
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"net/http"
"time"
secutils "github.com/Tencent/WeKnora/internal/utils"
secutils "academy/internal/utils"
)
// sharedEmbeddingHTTPTransport keeps a single SSRF-safe connection pool for
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"testing"
"time"
"github.com/Tencent/WeKnora/internal/types"
secutils "github.com/Tencent/WeKnora/internal/utils"
"academy/internal/types"
secutils "academy/internal/utils"
)
func TestNewEmbeddingHTTPClient_ReusesTransport(t *testing.T) {
+3 -3
View File
@@ -5,9 +5,9 @@ import (
"strings"
"testing"
"github.com/Tencent/WeKnora/internal/models/api"
modelruntime "github.com/Tencent/WeKnora/internal/models/runtime"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/models/api"
modelruntime "academy/internal/models/runtime"
"academy/internal/types"
"github.com/stretchr/testify/require"
)
+3 -3
View File
@@ -12,8 +12,8 @@ import (
"testing"
"unicode/utf8"
"github.com/Tencent/WeKnora/internal/types"
secutils "github.com/Tencent/WeKnora/internal/utils"
"academy/internal/types"
secutils "academy/internal/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -451,7 +451,7 @@ func TestEmbeddingWireFormatPerVendor(t *testing.T) {
wantBody: openAIBody("my-deployment", three, map[string]any{"encoding_format": "float"}),
},
{
name: "weknoracloud signs its own path", provider: "weknoracloud",
name: "academycloud signs its own path", provider: "academycloud",
model: "cloud-embedding", appID: "app",
wantPath: "/api/v1/embeddings", wantAuth: [2]string{"X-Appid", "app"},
wantBody: openAIBody("cloud-embedding", three, nil),