fix: Refine embedding model detection in channel test

This commit is contained in:
1808837298@qq.com
2025-03-09 15:03:07 +08:00
parent db01994cd0
commit 4a8bb625b8

View File

@@ -175,10 +175,10 @@ func buildTestRequest(model string) *dto.GeneralOpenAIRequest {
} }
// 先判断是否为 Embedding 模型 // 先判断是否为 Embedding 模型
if strings.Contains(strings.ToLower(model), "embedding") || if strings.Contains(strings.ToLower(model), "embedding") || // 其他 embedding 模型
strings.HasPrefix(model, "m3e") || // m3e 系列模型 strings.HasPrefix(model, "m3e") || // m3e 系列模型
strings.Contains(model, "bge-") || // bge 系列模型 strings.Contains(model, "bge-") {
model == "text-embedding-v1" { // 其他 embedding 模型 testRequest.Model = model
// Embedding 请求 // Embedding 请求
testRequest.Input = []string{"hello world"} testRequest.Input = []string{"hello world"}
return testRequest return testRequest