mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-06 16:24:17 +00:00
fix(agent): block non-pdf assets in read_pdf_pages and remove mediaType fallback in AgentChatPromptBuilder
This commit is contained in:
@@ -78,7 +78,7 @@ export function createReadPdfPagesTool(
|
||||
}
|
||||
|
||||
const proxyType = (asset.media as PrismaJson.MediaInfo | null)?.proxyType
|
||||
if (proxyType && proxyType !== 'pdf') {
|
||||
if (proxyType !== 'pdf') {
|
||||
return {
|
||||
content: [{ type: 'text', text: `Asset ${targetAssetId} is not a PDF or document.` }],
|
||||
details: {},
|
||||
|
||||
Reference in New Issue
Block a user