feat: Add PDF file support for OpenAI vision models (#7217)
* feat: add base64 PDF support for OpenAI vision models Signed-off-by: MurphyLo <1335758958@qq.com> * sort imports in OpenAIResponseAPIClient.ts * sort imports in OpenAIResponseAPIClient.ts * remove pdf-parse * modify pdfPageCount implementation to use officeparser built-in pdf.js * chore: update yarn.lock to remove pdf-parse dependency --------- Signed-off-by: MurphyLo <1335758958@qq.com> Co-authored-by: suyao <sy20010504@gmail.com>
This commit is contained in:
@@ -83,6 +83,7 @@ const api = {
|
||||
copy: (fileId: string, destPath: string) => ipcRenderer.invoke(IpcChannel.File_Copy, fileId, destPath),
|
||||
binaryImage: (fileId: string) => ipcRenderer.invoke(IpcChannel.File_BinaryImage, fileId),
|
||||
base64File: (fileId: string) => ipcRenderer.invoke(IpcChannel.File_Base64File, fileId),
|
||||
pdfInfo: (fileId: string) => ipcRenderer.invoke(IpcChannel.File_GetPdfInfo, fileId),
|
||||
getPathForFile: (file: File) => webUtils.getPathForFile(file)
|
||||
},
|
||||
fs: {
|
||||
|
||||
Reference in New Issue
Block a user