feat(lkeap): integrate Tencent Cloud LKEAP Rerank support
- Added support for Tencent Cloud LKEAP Rerank, including new configuration options for SecretId and SecretKey. - Updated frontend components to handle LKEAP-specific fields and enhance user experience with appropriate labels and placeholders. - Enhanced backend logic to manage LKEAP credentials and integrate with the new rerank API. - Improved localization for LKEAP-related terms across multiple languages, ensuring clarity and consistency in user-facing messages. - Introduced tests for LKEAP Reranker functionality to ensure reliability and correctness in handling requests.
This commit is contained in:
@@ -231,14 +231,19 @@ func TestListByModelType(t *testing.T) {
|
||||
providers := ListByModelType(types.ModelTypeRerank)
|
||||
assert.NotEmpty(t, providers)
|
||||
// Check that Aliyun supports rerank
|
||||
found := false
|
||||
foundAliyun := false
|
||||
foundLKEAP := false
|
||||
for _, p := range providers {
|
||||
if p.Name == ProviderAliyun {
|
||||
found = true
|
||||
break
|
||||
foundAliyun = true
|
||||
}
|
||||
if p.Name == ProviderLKEAP {
|
||||
foundLKEAP = true
|
||||
assert.Equal(t, LKEAPRerankBaseURL, p.GetDefaultURL(types.ModelTypeRerank))
|
||||
}
|
||||
}
|
||||
assert.True(t, found, "Aliyun should support rerank")
|
||||
assert.True(t, foundAliyun, "Aliyun should support rerank")
|
||||
assert.True(t, foundLKEAP, "LKEAP should support rerank")
|
||||
})
|
||||
|
||||
t.Run("embedding models include openrouter", func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user