mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-30 10:28:42 +00:00
Plugin support select file (#2756)
* feat: plugin support upload files (#2716) * feat: plugin support file upload * file history * fix history & chattest * chore: code * plugin config icon & file preview padding * perf: undefined fn * fix: plugin file numbers & plugin template add config (#2743) * perf: run plugin without human message (#2749) * perf: run plugin without human message * fix build * fix build * rename node * perf: ui * perf: plugin rerun with last params & plugin log add file (#2755) * perf: plugin run with last params & plugin log add file * delete console * perf: plugin refresh code * fix: ts --------- Co-authored-by: heheer <heheer@sealos.io>
This commit is contained in:
@@ -32,26 +32,3 @@ export const filterSearchResultsByMaxChars = async (
|
||||
|
||||
return results.length === 0 ? list.slice(0, 1) : results;
|
||||
};
|
||||
|
||||
/* Get plugin runtime input user query */
|
||||
export const getPluginRunUserQuery = ({
|
||||
nodes,
|
||||
variables,
|
||||
files = []
|
||||
}: {
|
||||
nodes: StoreNodeItemType[];
|
||||
variables: Record<string, any>;
|
||||
files?: RuntimeUserPromptType['files'];
|
||||
}): UserChatItemType & { dataId: string } => {
|
||||
return {
|
||||
dataId: getNanoid(24),
|
||||
obj: ChatRoleEnum.Human,
|
||||
value: runtimePrompt2ChatsValue({
|
||||
text: getPluginRunContent({
|
||||
pluginInputs: getPluginInputsFromStoreNodes(nodes),
|
||||
variables
|
||||
}),
|
||||
files
|
||||
})
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user