mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-20 11:26:07 +00:00
fix(rag): align knowledge engine plugin actions
This commit is contained in:
committed by
huanghuoguoguo
parent
6d0e6dcc63
commit
54e925daa0
@@ -42,6 +42,18 @@ export function isDynamicFormItemType(
|
||||
}
|
||||
|
||||
export function parseDynamicFormItemType(value: string): DynamicFormItemType {
|
||||
const typeMap: Record<string, DynamicFormItemType> = {
|
||||
[DynamicFormItemType.SELECT_LLM_MODEL]:
|
||||
DynamicFormItemType.LLM_MODEL_SELECTOR,
|
||||
[DynamicFormItemType.SELECT_KNOWLEDGE_BASES]:
|
||||
DynamicFormItemType.KNOWLEDGE_BASE_MULTI_SELECTOR,
|
||||
[DynamicFormItemType.NUMBER]: DynamicFormItemType.FLOAT,
|
||||
[DynamicFormItemType.JSON]: DynamicFormItemType.TEXT,
|
||||
};
|
||||
if (value in typeMap) {
|
||||
return typeMap[value];
|
||||
}
|
||||
|
||||
return isDynamicFormItemType(value) ? value : DynamicFormItemType.UNKNOWN;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user