mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-25 20:02:47 +00:00
fix: max tokens config (#5409)
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
Some checks failed
Build FastGPT images in Personal warehouse / get-vars (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Has been cancelled
This commit is contained in:
parent
0526411c05
commit
1fc1e3fa80
|
|
@ -113,13 +113,18 @@ export const loadSystemModels = async (init = false) => {
|
|||
const modelData: any = {
|
||||
...model,
|
||||
...dbModel?.metadata,
|
||||
// @ts-ignore
|
||||
defaultConfig: mergeObject(model.defaultConfig, dbModel?.metadata?.defaultConfig),
|
||||
// @ts-ignore
|
||||
fieldMap: mergeObject(model.fieldMap, dbModel?.metadata?.fieldMap),
|
||||
provider: getModelProvider(dbModel?.metadata?.provider || (model.provider as any)).id,
|
||||
type: dbModel?.metadata?.type || model.type,
|
||||
isCustom: false
|
||||
isCustom: false,
|
||||
|
||||
...(model.type === ModelTypeEnum.llm && dbModel?.metadata?.type === ModelTypeEnum.llm
|
||||
? {
|
||||
maxResponse: model.maxTokens ?? dbModel?.metadata?.maxResponse ?? 1000,
|
||||
defaultConfig: mergeObject(model.defaultConfig, dbModel?.metadata?.defaultConfig),
|
||||
fieldMap: mergeObject(model.fieldMap, dbModel?.metadata?.fieldMap),
|
||||
maxTokens: undefined
|
||||
}
|
||||
: {})
|
||||
};
|
||||
pushModel(modelData);
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue