fix: add hf task field (#976)

Co-authored-by: StyleZhang <jasonapring2015@outlook.com>
This commit is contained in:
takatost
2023-08-23 19:48:31 +08:00
committed by GitHub
parent a76fde3d23
commit 071e7800a0
4 changed files with 58 additions and 3 deletions

View File

@@ -124,8 +124,9 @@ const ModelPage = () => {
updateModelList(ModelType.embeddings)
mutateProviders()
}
const handleSave = async (v?: FormValue) => {
if (v && modelModalConfig) {
const handleSave = async (originValue?: FormValue) => {
if (originValue && modelModalConfig) {
const v = modelModalConfig.filterValue ? modelModalConfig.filterValue(originValue) : originValue
let body, url
if (ConfigurableProviders.includes(modelModalConfig.key)) {
const { model_name, model_type, ...config } = v