修复 core/rerank 测试编译失败(Rerank -> NewRerank),并支持离线跳过在线测试#45
Open
Emos21 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
core/rerank包在 main 分支上无法通过编译:rerank_test.go仍在调用旧函数名Rerank,而该函数已重命名为NewRerank,导致go test ./...在该包上直接构建失败。修复内容
NewRerank,包恢复可编译sk-***)必然失败;现改为从环境变量RERANK_API_KEY读取,未设置时自动跳过,保证go test ./...可以离线通过,同时保留在线验证能力:验证
go vet ./core/rerank/通过--- SKIP: TestRerank,包测试通过顺便说明:这个问题是我在做 #43(You.com 联网检索集成,PR #44)跑全量测试基线时发现的,与那个 PR 相互独立,故单独提交。