Feature/OpenAI Response API (#5014)

* - Added support for built-in OpenAI tools including web search, code interpreter, and image generation.
- Enhanced file handling by extracting artifacts and file annotations from response metadata.
- Implemented download functionality for file annotations in the UI.
- Updated chat history management to include additional kwargs for artifacts, file annotations, and used tools.
- Improved UI components to display used tools and file annotations effectively.

* remove redundant currentContainerId

* update comment
This commit is contained in:
Henry Heng
2025-08-07 17:59:05 +01:00
committed by GitHub
parent 3187377c61
commit b608219642
7 changed files with 860 additions and 14 deletions
@@ -16,6 +16,7 @@ const streamUploadedFile = async (req: Request, res: Response, next: NextFunctio
const chatflowId = req.query.chatflowId as string
const chatId = req.query.chatId as string
const fileName = req.query.fileName as string
const download = req.query.download === 'true' // Check if download parameter is set
const appServer = getRunningExpressApp()
@@ -35,7 +36,12 @@ const streamUploadedFile = async (req: Request, res: Response, next: NextFunctio
}
const orgId = workspace.organizationId as string
res.setHeader('Content-Disposition', contentDisposition(fileName))
// Set Content-Disposition header - force attachment for download
if (download) {
res.setHeader('Content-Disposition', contentDisposition(fileName, { type: 'attachment' }))
} else {
res.setHeader('Content-Disposition', contentDisposition(fileName))
}
const fileStream = await streamStorageFile(chatflowId, chatId, fileName, orgId)
if (!fileStream) throw new InternalFlowiseError(StatusCodes.INTERNAL_SERVER_ERROR, `Error: streamStorageFile`)