🔍 feat: Add Entity ID Support for File Search Shared Resources (#5028)

This commit is contained in:
Danny Avila 2024-12-17 22:11:18 -05:00 committed by GitHub
parent 18ad89be2c
commit d3cafeee96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 38 additions and 22 deletions

View file

@ -479,6 +479,7 @@ const processAgentFileUpload = async ({ req, res, metadata }) => {
}
let fileInfoMetadata;
const entity_id = messageAttachment === true ? undefined : agent_id;
if (tool_resource === EToolResources.execute_code) {
const { handleFileUpload: uploadCodeEnvFile } = getStrategyFunctions(FileSources.execute_code);
const result = await loadAuthValues({ userId: req.user.id, authFields: [EnvVar.CODE_API_KEY] });
@ -488,7 +489,7 @@ const processAgentFileUpload = async ({ req, res, metadata }) => {
stream,
filename: file.originalname,
apiKey: result[EnvVar.CODE_API_KEY],
entity_id: messageAttachment === true ? undefined : agent_id,
entity_id,
});
fileInfoMetadata = { fileIdentifier };
}
@ -512,6 +513,7 @@ const processAgentFileUpload = async ({ req, res, metadata }) => {
req,
file,
file_id,
entity_id,
});
let filepath = _filepath;