Skip to content

Commit

Permalink
Merge branch 'feat/model-provider-based-on-runtime' into deploy/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
zxhlyh committed Dec 28, 2023
2 parents bdf4773 + 0a43db8 commit 18828ff
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions web/app/components/datasets/common/retrieval-param-config/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,21 @@ const RetrievalParamConfig: FC<Props> = ({
</Tooltip>
</div>
</div>
<div>
<ModelSelector
defaultModel={rerankModel && { provider: rerankModel.provider_name, model: rerankModel.model_name }}
modelList={rerankModelList}
readonly={!value.reranking_enable && type !== RETRIEVE_METHOD.hybrid}
onSelect={(v) => {
onChange({
...value,
reranking_model: {
reranking_provider_name: v.provider,
reranking_model_name: v.model,
},
})
}}
/>
</div>
<ModelSelector
triggerClassName={`${!value.reranking_enable && type !== RETRIEVE_METHOD.hybrid && '!opacity-60 !cursor-not-allowed'}`}
defaultModel={rerankModel && { provider: rerankModel.provider_name, model: rerankModel.model_name }}
modelList={rerankModelList}
readonly={!value.reranking_enable && type !== RETRIEVE_METHOD.hybrid}
onSelect={(v) => {
onChange({
...value,
reranking_model: {
reranking_provider_name: v.provider,
reranking_model_name: v.model,
},
})
}}
/>
</div>
)}

Expand Down

0 comments on commit 18828ff

Please sign in to comment.