From e077f23f9e5f6f442f9527a5508d07ef8991fd64 Mon Sep 17 00:00:00 2001 From: hanishkvc Date: Sun, 2 Nov 2025 02:01:31 +0530 Subject: [PATCH] SimpleChatTC:Pdf2Text: Refine desc and MaxResultDataLength Needed to tweak the description further for the ai model to be able to understand that its ok to pass file:// scheme based urls Had forgotten how big the web site pages have become as also the need for more ResultDataLength wrt one shot PDF read to get atleast some good enough amount of content in it with large pdfs --- tools/server/public_simplechat/simplechat.js | 2 +- tools/server/public_simplechat/toolweb.mjs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/server/public_simplechat/simplechat.js b/tools/server/public_simplechat/simplechat.js index 1af93e2b20..c780373783 100644 --- a/tools/server/public_simplechat/simplechat.js +++ b/tools/server/public_simplechat/simplechat.js @@ -1344,7 +1344,7 @@ class Me { * Control the length of the tool call result data returned to ai after tool call. * A value of 0 is treated as unlimited data. */ - iResultMaxDataLength: 2048, + iResultMaxDataLength: 1024*128, /** * Control how many milliseconds to wait for tool call to respond, before generating a timed out * error response and giving control back to end user. diff --git a/tools/server/public_simplechat/toolweb.mjs b/tools/server/public_simplechat/toolweb.mjs index 518ccd6f90..34079d04fc 100644 --- a/tools/server/public_simplechat/toolweb.mjs +++ b/tools/server/public_simplechat/toolweb.mjs @@ -278,13 +278,13 @@ let pdf2text_meta = { "type": "function", "function": { "name": "pdf2text", - "description": "Read pdf from requested local file / web url through a proxy server and return its text content after converting pdf to text, in few seconds", + "description": "Read pdf from requested local file path / web url through a proxy server and return its text content after converting pdf to text, in few seconds", "parameters": { "type": "object", "properties": { "url":{ "type":"string", - "description":"local file path / web (http/https) based url of the pdf that will be got and inturn converted to text to an extent" + "description":"local file path (file://) / web (http/https) based url of the pdf that will be got and inturn converted to text to an extent" } }, "required": ["url"]