mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-04 18:45:38 +08:00
fix: output 2 lines when list-supported models (#16015)
### What problem does this PR solve? ``` RAGFlow(api/default)> list supported models from 'longcat' 'test' +-----------+------------+---------------+------------+-------------+-----------------------------+----------+ | dimension | dimensions | max_dimension | max_tokens | model_types | name | thinking | +-----------+------------+---------------+------------+-------------+-----------------------------+----------+ | | | | | | LongCat-2.0-Preview@LongCat | | | | | | | | LongCat-2.0-Preview@LongCat | | +-----------+------------+---------------+------------+-------------+-----------------------------+----------+ # Fixed: RAGFlow(api/default)> list supported models from 'longcat' 'test' +------------+---------------+------------+-------------+-----------------------------+----------+ | dimensions | max_dimension | max_tokens | model_types | name | thinking | +------------+---------------+------------+-------------+-----------------------------+----------+ | | | | | LongCat-2.0-Preview@LongCat | | +------------+---------------+------------+-------------+-----------------------------+----------+ ``` ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@@ -275,17 +275,6 @@ func (m *ModelProviderService) ListSupportedModels(providerName, instanceName, u
|
||||
"model_types": model.ModelTypes,
|
||||
"thinking": model.Thinking,
|
||||
})
|
||||
modelData := map[string]interface{}{
|
||||
"name": model.Name,
|
||||
"dimension": model.MaxDimension,
|
||||
"max_tokens": model.MaxTokens,
|
||||
"model_types": model.ModelTypes,
|
||||
"thinking": model.Thinking,
|
||||
}
|
||||
if len(model.Dimensions) > 0 {
|
||||
modelData["dimensions"] = model.Dimensions
|
||||
}
|
||||
result = append(result, modelData)
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user