mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-21 21:36:42 +08:00
Fixes: Added session variable types and modified configuration (#11269)
### What problem does this PR solve? Fixes: Added session variable types and modified configuration - Added more types of session variables - Modified the embedding model switching logic in the knowledge base configuration ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -348,30 +348,30 @@ export const buildDslComponentsByGraph = (
|
||||
return components;
|
||||
};
|
||||
|
||||
export const buildDslGobalVariables = (
|
||||
export const buildDslGlobalVariables = (
|
||||
dsl: DSL,
|
||||
gobalVariables?: Record<string, GlobalVariableType>,
|
||||
globalVariables?: Record<string, GlobalVariableType>,
|
||||
) => {
|
||||
if (!gobalVariables) {
|
||||
if (!globalVariables) {
|
||||
return { globals: dsl.globals, variables: dsl.variables || {} };
|
||||
}
|
||||
|
||||
let gobalVariablesTemp: Record<string, any> = {};
|
||||
let gobalSystem: Record<string, any> = {};
|
||||
let globalVariablesTemp: Record<string, any> = {};
|
||||
let globalSystem: Record<string, any> = {};
|
||||
Object.keys(dsl.globals)?.forEach((key) => {
|
||||
if (key.indexOf('sys') > -1) {
|
||||
gobalSystem[key] = dsl.globals[key];
|
||||
globalSystem[key] = dsl.globals[key];
|
||||
}
|
||||
});
|
||||
Object.keys(gobalVariables).forEach((key) => {
|
||||
gobalVariablesTemp['env.' + key] = gobalVariables[key].value;
|
||||
Object.keys(globalVariables).forEach((key) => {
|
||||
globalVariablesTemp['env.' + key] = globalVariables[key].value;
|
||||
});
|
||||
|
||||
const gobalVariablesResult = {
|
||||
...gobalSystem,
|
||||
...gobalVariablesTemp,
|
||||
const globalVariablesResult = {
|
||||
...globalSystem,
|
||||
...globalVariablesTemp,
|
||||
};
|
||||
return { globals: gobalVariablesResult, variables: gobalVariables };
|
||||
return { globals: globalVariablesResult, variables: globalVariables };
|
||||
};
|
||||
|
||||
export const receiveMessageError = (res: any) =>
|
||||
|
||||
Reference in New Issue
Block a user