Feat: Add rerank option to huggingface's model type drop-down box. #5658 (#5689)

### What problem does this PR solve?

Feat: Add rerank option to huggingface's model type drop-down box. #5658

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu 2025-03-06 11:03:08 +08:00 committed by GitHub
parent b8da2eeb69
commit 1b2fc3cc9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,6 +74,7 @@ const OllamaModal = ({
[LLMFactory.HuggingFace]: [
{ value: 'embedding', label: 'embedding' },
{ value: 'chat', label: 'chat' },
{ value: 'rerank', label: 'rerank' },
],
[LLMFactory.Xinference]: [
{ value: 'chat', label: 'chat' },
@ -170,7 +171,7 @@ const OllamaModal = ({
type: 'number',
message: t('maxTokensInvalidMessage'),
},
({ getFieldValue }) => ({
({}) => ({
validator(_, value) {
if (value < 0) {
return Promise.reject(new Error(t('maxTokensMinMessage')));