+10
-5
lines changedFilter options
+10
-5
lines changed Original file line number Diff line number Diff line change
@@ -113,13 +113,18 @@ export const loadSystemModels = async (init = false) => {
113
113
const modelData: any = {
114
114
...model,
115
115
...dbModel?.metadata,
116
-
// @ts-ignore
117
-
defaultConfig: mergeObject(model.defaultConfig, dbModel?.metadata?.defaultConfig),
118
-
// @ts-ignore
119
-
fieldMap: mergeObject(model.fieldMap, dbModel?.metadata?.fieldMap),
120
116
provider: getModelProvider(dbModel?.metadata?.provider || (model.provider as any)).id,
121
117
type: dbModel?.metadata?.type || model.type,
122
-
isCustom: false
118
+
isCustom: false,
119
+
120
+
...(model.type === ModelTypeEnum.llm && dbModel?.metadata?.type === ModelTypeEnum.llm
121
+
? {
122
+
maxResponse: model.maxTokens ?? dbModel?.metadata?.maxResponse ?? 1000,
123
+
defaultConfig: mergeObject(model.defaultConfig, dbModel?.metadata?.defaultConfig),
124
+
fieldMap: mergeObject(model.fieldMap, dbModel?.metadata?.fieldMap),
125
+
maxTokens: undefined
126
+
}
127
+
: {})
123
128
};
124
129
pushModel(modelData);
125
130
})
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4