mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-02 20:58:12 +00:00
fix: toolNode max tokens and toolDescription i18n (#2655)
* fix: toolNode max tokens * fix: toolNode max tokens * fix: workflow tool desc i18n
This commit is contained in:
@@ -62,10 +62,12 @@ export const nodeTemplate2FlowNode = ({
|
||||
};
|
||||
export const storeNode2FlowNode = ({
|
||||
item: storeNode,
|
||||
selected = false
|
||||
selected = false,
|
||||
t
|
||||
}: {
|
||||
item: StoreNodeItemType;
|
||||
selected?: boolean;
|
||||
t: TFunction;
|
||||
}): Node<FlowNodeItemType> => {
|
||||
// init some static data
|
||||
const template =
|
||||
@@ -99,6 +101,9 @@ export const storeNode2FlowNode = ({
|
||||
...storeInput,
|
||||
...templateInput,
|
||||
|
||||
debugLabel: t(templateInput.debugLabel ?? (storeInput.debugLabel as any)),
|
||||
toolDescription: t(templateInput.toolDescription ?? (storeInput.toolDescription as any)),
|
||||
|
||||
selectedTypeIndex: storeInput.selectedTypeIndex ?? templateInput.selectedTypeIndex,
|
||||
value: storeInput.value ?? templateInput.value,
|
||||
label: storeInput.label ?? templateInput.label
|
||||
@@ -126,6 +131,8 @@ export const storeNode2FlowNode = ({
|
||||
...storeOutput,
|
||||
...templateOutput,
|
||||
|
||||
description: t(templateOutput.description ?? (storeOutput.description as any)),
|
||||
|
||||
id: storeOutput.id ?? templateOutput.id,
|
||||
label: storeOutput.label ?? templateOutput.label,
|
||||
value: storeOutput.value ?? templateOutput.value
|
||||
|
Reference in New Issue
Block a user