fix: create plugin by curl (#3580)

This commit is contained in:
Archer
2025-01-13 18:27:31 +08:00
committed by GitHub
parent e933dacb05
commit 80c8897e10
6 changed files with 178 additions and 118 deletions

View File

@@ -49,9 +49,10 @@ export type FlowNodeInputItemType = InputComponentPropsType & {
debugLabel?: string;
description?: string; // field desc
required?: boolean;
toolDescription?: string; // If this field is not empty, it is entered as a tool
enum?: string;
toolDescription?: string; // If this field is not empty, it is entered as a tool
// render components params
canEdit?: boolean; // dynamic inputs
isPro?: boolean; // Pro version field

View File

@@ -210,7 +210,7 @@ export const runToolWithToolChoice = async (
properties[item.key] = {
...jsonSchema,
description: item.toolDescription || '',
enum: item.enum?.split('\n').filter(Boolean) || []
enum: item.enum?.split('\n').filter(Boolean) || undefined
};
});
@@ -227,6 +227,7 @@ export const runToolWithToolChoice = async (
}
};
});
// Filter histories by maxToken
const filterMessages = (
await filterGPTMessageByMaxTokens({